home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / jpdoor32.zip / JPDOOR.REF < prev    next >
Text File  |  1992-02-26  |  130KB  |  3,845 lines

  1.  
  2.  
  3.            ┌──────────────────────────────────────────────┐
  4.            │             MOTOR CITY SOFTWARE              │
  5.            │   ┌──────────────────────────────────────┐   │
  6.            │   │       JPDoor - Version 3.2 SE        │   │
  7.            │   │        Copyright 1990 - 1992         │   │
  8.            │   │            ┌──────────┐              │   │
  9.            │   │            │\         │              │   │
  10.            │   │            │ \        │              │   │
  11.            │   │            │  \   P   │              │   │
  12.            │   │            │   \  A   │              │   │
  13.            │   │            │   │  S   │              │   │
  14.            │   │            │   │  C   │              │   │
  15.            │   │     5.5    │   │  A   │    6.0       │   │
  16.            │   │            │  o│  L   │              │   │
  17.            │   │            │   │      │              │   │
  18.            │   │            \   │──────┘              │   │
  19.            │   │             \  │                     │   │
  20.            │   └──────────────\ │─────────────────────┘   │
  21.            │      The Ultimate \│ Door Writing Unit.      │
  22.            └────────────────────┴─────────────────────────┘
  23.  
  24.  
  25.  
  26.                           JPDoor - Version 3.2 SE
  27.                Copyright 1990,1991,1992 by Motor City Software
  28.                             All Rights Reserved
  29.  
  30.   
  31.  
  32.  
  33.  
  34.     * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  35.    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  36.  *                                                                       *
  37. *           R  E  F  E  R  E  N  C  E      S  E  C  T  I  O  N            *
  38.  *                                                                       *
  39.   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  40.    * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  41.  
  42.  
  43.  
  44.  P R I N T    T H I S    S E C T I O N    A N D    U S E    I T    F O R
  45.  
  46.  
  47.  
  48.                     Q U I C K     R E F E R E N C E
  49.  
  50.                      * * * * * * * * * * * * * * *
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. REFERENCE:
  65. ----------
  66.  
  67.  
  68. Unit Constants
  69. --------------
  70.  
  71.       JPDoor has some pre-defined constants which cannot be changed, but
  72.    can be used by your program.
  73.  
  74.  
  75.    MaxPort      = 4;                            { Max Com Ports Supported    }
  76.  
  77.    JPDVersion   = '3.2';                        { JPDoor Version             }
  78.  
  79.    Compiled     =  'Compiled on <Date>';        { Date JPDoor was compiled   }
  80.  
  81.    Beta         =  False;                       { True in Beta versions      }
  82.  
  83.    ANSIcls      =  #27 + '[40m' + #27 + '[2J';  { Ansi Codes to clear screen }
  84.  
  85.    MaxKeys      =  20;                          { Max User keys supported    }
  86.  
  87.    LockMde      =  64+2;                        { File Locking opens files as}
  88.                                                 { Shared/Read/Write          }
  89.  
  90.    SoftCr       = #141;                         { Use this in messages for CR}
  91.  
  92.    Cr           =  #13;                         { Carriage Return            }
  93.  
  94.  
  95. The Following are Used in PostMsg attributes
  96.  
  97.    Msg_Delete   =    1; { (Attr AND   1) =   1 msg deleted }
  98.  
  99.    Msg_Out_Net  =    2; { (Attr AND   2) =   2 netmail to be scanned out}
  100.  
  101.    Msg_Net      =    4; { (Attr AND   4) =   4 Netmail Message }
  102.  
  103.    Msg_Private  =    8; { (Attr AND   8) =   8 Private Message }
  104.  
  105.    Msg_Received =   16; { (Attr AND  16) =  16 Message Received }
  106.  
  107.    Msg_Out_Echo =   32; { (Attr AND  32) =  32 Echomail to be scanned out }
  108.  
  109.    Msg_Local    =   64; { (Attr AND  64) =  64 ALWAYS SET msg entered locally }
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 2 ]
  125.  
  126. Unit Types
  127. ----------
  128.  
  129.       The following Types are already defined in JPDoor, and are available
  130.     for your own use:
  131.  
  132.   PathStr      = String[79];
  133.   StatStr      = String[78];
  134.   TextString   = String;
  135.   Str18        = String[18];
  136.   Str15        = String[15];
  137.   Str8         = String[8];
  138.   Str5         = String[5];
  139.   Str2         = String[2];
  140.   Str1         = String[1];
  141.   NameStr      = String[30];
  142.   CharSet      = Set of Char;
  143.   FlagSet      = (A0,A1,A2,A3,A4,A5,A6,A7,A8,
  144.                      B1,B2,B3,B4,B5,B6,B7,B8,
  145.                      C1,C2,C3,C4,C5,C6,C7,C8,
  146.                      D1,D2,D3,D4,D5,D6,D7,D8);
  147.   On_Off       = (Null,On,Off);
  148.   Killer       = (Kill,NoKill);
  149.   CardSuit     = (C,D,H,S);
  150.   JPUseData    = Array[1..2048] of Byte;
  151.   JPUseRecord  = Record
  152.     Name            : String[35];
  153.     Line            : Byte;
  154.     DoorName        : String[20];
  155.     Status          : Byte;
  156.     MaxPlayers      : Byte;
  157.     Filler          : Array[1..13] of Byte;
  158.     MultiNode       : Boolean;
  159.     PID             : Integer;
  160.     Data            : JPUseData;
  161.   End;
  162.  
  163.   AskType      = (Yes, No, Ask, Only);
  164.  
  165.   VideoType    = (Auto, Short, Long);
  166.  
  167.   MsgKindsType = (Both, Private, Public, ROnly);
  168.  
  169.   MsgTxt       = Record
  170.     Line            : String[255];
  171.   End;
  172.  
  173.   MsgToIdx     = Record;
  174.     User            : String[35];
  175.   End;
  176.  
  177.   MsgType        = (LocalMail, NetMail, EchoMail);
  178.   OrphanType     = (Ignore, Create, RA_Kill);
  179.   FlagType       = array[1..4] of Byte;
  180.   RA_Time        = String[5];
  181.   RA_Date        = String[8];
  182.   LongDate       = String[9];
  183.  
  184.  
  185.  
  186. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 3 ]
  187.  
  188. Unit Types (Continued)
  189. ----------------------
  190.  
  191.   NetAddress     = record
  192.     Zone,
  193.     Net,
  194.     Node,
  195.     Point          : Word;
  196.   end;
  197.  
  198.   LANGUAGErecord = record
  199.     Name           : String[20];
  200.     Attribute      : Byte;
  201.     DefName,
  202.     MenuPath,
  203.     TextPath,
  204.     QuesPath       : String[60];
  205.     FreeSpace      : Array[1..200] of Byte;
  206.   end;
  207.  
  208.   MSGINFOrecord  = record
  209.     LowMsg,
  210.     HighMsg,
  211.     TotalMsgs      : Word;
  212.     TotalOnBoard   : array[1..200] of Word;
  213.   end;
  214.  
  215.   MSGIDXrecord   = record
  216.     MsgNum         : Integer;
  217.     Board          : Byte;
  218.   end;
  219.  
  220.   MSGTOIDXrecord = String[35];
  221.  
  222.   MSGHDRrecord   = record
  223.     MsgNum         : Integer;
  224.     PrevReply,
  225.     NextReply,
  226.     TimesRead      : Word;
  227.     StartBlock     : Word;
  228.     NumBlocks,
  229.     DestNet,
  230.     DestNode,
  231.     OrigNet,
  232.     OrigNode       : Word;
  233.     DestZone,
  234.     OrigZone       : Byte;
  235.     Cost           : Word;
  236.     MsgAttr,
  237.     NetAttr,
  238.     Board          : Byte;
  239.     PostTime       : RA_Time;
  240.     PostDate       : RA_Date;
  241.     WhoTo,
  242.     WhoFrom        : MSGTOIDXrecord;
  243.     Subject        : String[72];
  244.   end;
  245.  
  246.   MSGTXTrecord   = String[255];
  247.  
  248. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 4 ]
  249.  
  250. Unit Types (Continued)
  251. ----------------------
  252.  
  253.   { RemoteAccess V1.1x Useron.Bbs }
  254.   USERON110record   = record
  255.     Name           : MSGTOIDXrecord;
  256.     Handle         : MSGTOIDXrecord;
  257.     Line           : Byte;
  258.     Baud           : Word;
  259.     City           : String[25];
  260.     DoNotDisturb   : Boolean;
  261.     Status         : Byte;
  262.     Attribute      : Byte;
  263.   end;
  264.  
  265.  
  266.   { RemoteAccess 1.00 Useron.Bbs }
  267.   USERONrecord   = record
  268.     Name           : MSGTOIDXrecord;
  269.     Line           : Byte;
  270.     Baud           : Word;
  271.     City           : String[25];
  272.     DoNotDisturb   : Boolean;
  273.     Status         : Byte;
  274.   end;
  275.  
  276.   { RemoteAccess Status byte - 0 : Browsing (in a menu)
  277.                                1 : Uploading/downloading
  278.                                2 : Reading/posting messages
  279.                                3 : In a door/external utility
  280.                                4 : Chatting with sysop
  281.                                5 : Answering questionnaire }
  282.  
  283.  
  284.   { QBBS 2.75 UserOn.BBS }
  285.   Q_USERONrecord= Record
  286.     Name           : String[35];
  287.     Line           : Byte;
  288.     Baud           : Word;
  289.     City           : String[25];
  290.     DoNotDisturb   : Boolean;
  291.   End;
  292.  
  293.  
  294.   { RemoteAccess V1.10 Lastcall.Bbs }
  295.   LASTCALL110record = record
  296.     Line           : Byte;
  297.     Name           : MSGTOIDXrecord;
  298.     Handle         : MSGTOIDXrecord;
  299.     City           : String[25];
  300.     Baud           : Word;
  301.     Times          : LongInt;
  302.     LogOn          : String[5];
  303.     LogOff         : String[5];
  304.     Attribute      : Byte;     { Byte 0 : Hidden }
  305.   end;
  306.  
  307.  
  308.  
  309.  
  310. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 5 ]
  311.  
  312. Unit Types (Continued)
  313. ----------------------
  314.  
  315. RemoteAccess V1.00 / QBBS Lastcall.Bbs
  316.  
  317.   LASTCALLrecord = record
  318.     Line           : Byte;
  319.     Name           : MSGTOIDXrecord;
  320.     City           : String[25];
  321.     Baud           : Word;
  322.     Times          : LongInt;
  323.     LogOn          : String[5];
  324.     LogOff         : String[5];
  325.   end;
  326.  
  327.  
  328.   LASTREADrecord = array[1..200] of Word;
  329.  
  330.  
  331.   COMBINEDrecord = array[1..25] of Byte;
  332.  
  333.  
  334.   USERSIDXrecord = record
  335.     NameCRC32,
  336.     HandleCRC32    : Longint;
  337.   End;
  338.  
  339.  
  340.   USERSXIrecord  = record
  341.     Handle         : String[35];
  342.     Comment        : String[80];
  343.     FirstDate      : RA_Date;
  344.     CombinedInfo   : Array[1..25] of byte;
  345.     BirthDate      : RA_Date;
  346.     SubDate        : RA_Date;
  347.     ScreenWidth    : Byte;
  348.     MsgArea        : Byte;
  349.     FileArea       : Byte;
  350.     Language       : Byte;
  351.     DateFormat     : Byte;
  352.     ForwardTo      : String[35];
  353.     Extra          : Array[1..43] of byte;
  354.   End;
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 6 ]
  373.  
  374. Unit Types (Continued)
  375. ----------------------
  376.  
  377. RemoteAccess/QBBS USERS.BBS File Structure
  378.  
  379.   USERSRecord     = record
  380.     Name           : string[35];
  381.     Location       : string[25];
  382.     Password       : string[15];
  383.     DataPhone,
  384.     VoicePhone     : string[12];
  385.     LastTime       : string[5];
  386.     LastDate       : RA_Date;
  387.     Attribute      : byte;
  388.     { Bit 0 : Deleted
  389.           1 : Clear screen
  390.           2 : More prompt
  391.           3 : ANSI
  392.           4 : No-kill
  393.           5 : Xfer priority
  394.           6 : Full screen msg editor
  395.           7 : Quiet mode }
  396.     Flags          : FlagType;
  397.     Credit,
  398.     Pending,
  399.     MsgsPosted,
  400.     LastRead,
  401.     Security,
  402.     NoCalls,
  403.     Uploads,
  404.     Downloads,
  405.     UploadsK,
  406.     DownLoadsK     : word;
  407.     TodayK,
  408.     Elapsed        : integer;
  409.     ScreenLength   : word;
  410.     LastPwdChange  : byte;
  411.     Attribute2     : byte;
  412.     { Bit 0 : Hot-keys
  413.           1 : AVT/0
  414.           2 : Full screen message viewer
  415.           3 : Hidden from userlist }
  416.     Group          : byte;
  417.     XIRecord       : word;
  418.     Extra          : array[1..3] of byte;
  419.   end;
  420.  
  421.   SYSINFOrecord  = record
  422.     CallCount      : LongInt;
  423.     LastCaller     : MSGTOIDXrecord;
  424.     ExtraSpace     : array[1..128] of Byte;
  425.   end;
  426.  
  427.   TIMELOGrecord  = record
  428.     StartDate      : RA_Date;
  429.     BusyPerHour    : array[0..23] of Word;
  430.     BusyPerDay     : array[0..6] of Word;
  431.   end;
  432.  
  433.  
  434. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 7 ]
  435.  
  436. Unit Types (Continued)
  437. ----------------------
  438.  
  439.   MNUrecord      = record
  440.     Typ            : Byte;
  441.     Security       : Word;
  442.     Flags          : FlagType;
  443.     Display        : String[75];
  444.     HotKey         : Char;
  445.     MiscData       : String[80];
  446.     Foreground,
  447.     Background     : Byte;
  448.   end;
  449.  
  450.  
  451.   EVENTrecord    = record
  452.     Status         : Byte; { 0=Deleted 1=Enabled 2=Disabled }
  453.     RunTime        : RA_Time;
  454.     ErrorLevel     : Byte;
  455.     Days           : Byte;
  456.     Forced         : Boolean;
  457.     LastTimeRun    : RA_Date;
  458.   end;
  459.  
  460.   EVENTrecordArray = array[1..20] of EVENTrecord;
  461.  
  462.  
  463.   MESSAGErecord  = record
  464.     Name           : String[40];
  465.     Typ            : MsgType;
  466.     MsgKinds       : MsgKindsType;
  467.     Attribute      : Byte;
  468.     { Bit 0 : Enable EchoInfo
  469.           1 : Combined access
  470.           2 : File attaches
  471.           3 : Allow aliases
  472.           5 : Force handle
  473.           6 : Allow Deletes     }
  474.     DaysKill,                  { Kill older than 'x' days }
  475.     RecvKill       : Byte; { Kill recv msgs, recv for more than 'x' days }
  476.     CountKill      : Word;
  477.     ReadSecurity   : Word;
  478.     ReadFlags      : FlagType;
  479.     WriteSecurity  : Word;
  480.     WriteFlags     : FlagType;
  481.     SysopSecurity  : Word;
  482.     SysopFlags     : FlagType;
  483.     OriginLine     : String[60];
  484.     AkaAddress     : Byte;
  485.   end;
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 8 ]
  497.  
  498. Unit Types (Continued)
  499. ----------------------
  500.  
  501. RemoteAccess V1.1x FILES.RA File Structure
  502.  
  503.   FILESrecord    = record
  504.     Name           : String[30];
  505.     Attrib         : Byte;
  506.  
  507.                { Bit 0 : Include in new files scan
  508.                      1 : Include in upload dupe scan
  509.                      2 : Permit long descriptions }
  510.  
  511.     FilePath       : String[40];
  512.     FreeSpace      : Array[1..35] of Byte;
  513.     UploadSecurity : Word;
  514.     UploadFlagsFlags:FlagType;
  515.     Security       : Word;
  516.     Flags          : FlagType;
  517.     ListSecurity   : Word;
  518.     ListFlags      : FlagType;
  519.   end;
  520.  
  521.  
  522. RemoteAccess V1.1x CONFIG.RA File Structure
  523.  
  524.   CONFIG110record = Record
  525.     VersionID           : Word;
  526.     CommPort            : Byte;
  527.     Baud                : LongInt;
  528.     InitTries           : Byte;
  529.     InitStr,
  530.     BusyStr             : String[70];
  531.     InitResp,
  532.     BusyResp,
  533.     Connect300,
  534.     Connect1200,
  535.     Connect2400,
  536.     Connect4800,
  537.     Connect9600,
  538.     Connect19k,
  539.     Connect38k          : String[40];
  540.     AnswerPhone         : Boolean;
  541.     Ring,
  542.     AnswerStr           : String[20];
  543.     FlushBuffer         : Boolean;
  544.     ModemDelay          : Integer;
  545.     MinimumBaud,
  546.     GraphicsBaud,
  547.     TransferBaud        : Integer;
  548.     SlowBaudTimeStart,
  549.     SlowBaudTimeEnd,
  550.     DownloadTimeStart,
  551.     DownloadTimeEnd,
  552.     PageStart,
  553.     PageEnd             : Array[0..6] of RA_Time;
  554.     FreeSpace1          : Array[1..70] of Byte;
  555.  
  556.  Continued Next Page...
  557.  
  558. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 9 ]
  559.  
  560. Unit Types (Continued)
  561. ----------------------
  562.  
  563. RemoteAccess V1.1x CONFIG.RA File Structure Continued
  564.  
  565.     PwdExpiry           : Word;
  566.     MenuPath,
  567.     TextPath,
  568.     AttachPath,
  569.     NodelistPath,
  570.     MsgBasePath,
  571.     SysPath,
  572.     ExternalEdCmd       : String[60];
  573.     Address             : Array[0..9] of NetAddress;
  574.     SystemName          : String[30];
  575.     NewSecurity         : Word;
  576.     NewCredit           : Word;
  577.     NewFlags            : FlagType;
  578.     OriginLine          : String[60];
  579.     QuoteString         : String[15];
  580.     Sysop               : String[35];
  581.     LogFileName         : String[60];
  582.     FastLogon,
  583.     AllowSysRem,
  584.     MonoMode,
  585.     StrictPwdChecking,
  586.     DirectWrite,
  587.     SnowCheck           : Boolean;
  588.     CreditFactor        : Integer;
  589.     UserTimeOut,
  590.     LogonTime,
  591.     PasswordTries,
  592.     MaxPage,
  593.     PageLength          : Word;
  594.     CheckForMultiLogon,
  595.     ExcludeSysopFromList,
  596.     OneWordNames        : Boolean;
  597.     CheckMail           : AskType;
  598.     AskVoicePhone,
  599.     AskDataPhone,
  600.     DoFullMailCheck,
  601.     AllowFileShells,
  602.     FixUploadDates,
  603.     FreezeChat          : Boolean;
  604.     ANSI,                       { ANSI: Yes, no, or ask new users     }
  605.     ClearScreen,                { Clear:        "                     }
  606.     MorePrompt          : AskType;    { More:         "                     }
  607.     UploadMsgs          : Boolean;
  608.     KillSent            : AskType;    { Kill/Sent     "                     }
  609.     CrashAskSec         : Word;       { Min sec# to ask 'Crash Mail ?'      }
  610.     CrashAskFlags       : FlagType;
  611.     CrashSec            : Word;       { Min sec# to always send crash mail. }
  612.     CrashFlags          : FlagType;
  613.     FAttachSec          : Word;       {        "    ask 'File Attach ?'     }
  614.     FAttachFlags        : FlagType;
  615.  
  616.  Continued Next Page...
  617.  
  618.  
  619.  
  620. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 10]
  621.  
  622. Unit Types (Continued)
  623. ----------------------
  624.  
  625. RemoteAccess V1.1x CONFIG.RA File Structure Continued
  626.  
  627.     NormFore,
  628.     NormBack,
  629.     StatFore,
  630.     StatBack,
  631.     HiBack,
  632.     HiFore,
  633.     WindFore,
  634.     WindBack,
  635.     ExitLocal,
  636.     Exit300,
  637.     Exit1200,
  638.     Exit2400,
  639.     Exit4800,
  640.     Exit9600,
  641.     Exit19k,
  642.     Exit38k             : Byte;
  643.     MultiLine           : Boolean;
  644.     MinPwdLen           : Byte;
  645.     MinUpSpace          : Word;
  646.     HotKeys             : AskType;
  647.     BorderFore,
  648.     BorderBack,
  649.     BarFore,
  650.     BarBack,
  651.     LogStyle,
  652.     MultiTasker,
  653.     PwdBoard            : Byte;
  654.     BufferSize          : Word;
  655.     FKeys               : Array[1..10] of String[60];
  656.     WhyPage             : Boolean;
  657.     LeaveMsg            : Byte;
  658.     ShowMissingFiles    : Boolean;
  659.     FreeSpace2          : Array[1..11] of Byte;
  660.     AllowNetmailReplies : Boolean;
  661.     LogonPrompt         : String[40];
  662.     CheckNewFiles       : AskType;
  663.     ReplyHeader         : String[60];
  664.     BlankSecs           : byte;
  665.     ProtocolAttrib      : Array[1..6] of Byte;
  666.     ErrorFreeString     : String[15];
  667.     DefaultCombined     : COMBINEDrecord;
  668.     RenumThreshold      : Word;
  669.     LeftBracket,
  670.     RightBracket        : Char;
  671.     AskForHandle        : Boolean;
  672.     AskForBirthDate     : Boolean;
  673.     GroupMailSec        : Word;
  674.     ConfirmMsgDeletes   : Boolean;
  675.     FreeSpace3          : Array[1..163] of Byte;
  676.  
  677.  Continued Next Page...
  678.  
  679.  
  680.  
  681.  
  682. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 11]
  683.  
  684. Unit Types (Continued)
  685. ----------------------
  686.  
  687. RemoteAccess V1.1x CONFIG.RA File Structure Continued
  688.  
  689.     NewUserGroup        : Byte;
  690.     AVATAR              : AskType;
  691.     BadPwdArea          : Byte;
  692.     Location            : String[40];
  693.     DoAfterAction       : Byte; {0 = wait for CR, > 0 = wait for x seconds}
  694.     FileLine            : String[40];
  695.     CRfore,
  696.     CRback              : Byte;
  697.     LangHdr             : String[40];
  698.     SendBreak           : Boolean;
  699.     ListPath            : String[60];
  700.     FullMsgView         : AskType;
  701.     EMSI_Enable,
  702.     EMSI_NewUser        : Boolean;
  703.     EchoChar            : String[1];
  704.     Connect7200,
  705.     Connect12000,
  706.     Connect14400        : String[40];
  707.     Exit7200,
  708.     Exit12000,
  709.     Exit14400           : Byte;
  710.     ChatCommand         : String[60];
  711.     ExtEd               : AskType;
  712.     NewuserLanguage     : Byte;
  713.     LanguagePrompt      : String[40];
  714.     VideoMode           : VideoType;
  715.     AutoDetectANSI      : Boolean;
  716.     OffHook             : Boolean;
  717.     NewUserDateFormat   : Byte;
  718.     KeyboardPwd         : String[15];
  719.     CapLocation         : Boolean;
  720.     NewuserSub          : Byte;
  721.     PrinterName         : String[4];
  722.     HilitePromptFore,
  723.     HiLitePromptBack    : Byte;
  724.     InitStr2            : String[70];
  725.     AltJSwap            : Boolean;
  726.     SemPath             : String[60];
  727.     AutoChatCapture     : Boolean;
  728.     FutureExpansion : Array[1..97] of Byte;
  729.   end;
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 12]
  745.  
  746. Unit Types (Continued)
  747. ----------------------
  748.  
  749. RemoteAccess V1.10 EXITINFO.BBS File Structure
  750.  
  751.   ExitRec = record
  752.     Baud             : Word;
  753.     SysInfo          : SYSINFOrecord;
  754.     TimeLogInfo      : TIMELOGrecord;
  755.     UserInfo         : USERSrecord;
  756.     EventInfo        : EVENTrecord;
  757.     NetMailEntered,
  758.     EchoMailEntered  : Boolean;
  759.     LoginTime        : RA_Time;
  760.     LoginDate        : RA_Date;
  761.     TimeLimit        : Word;
  762.     LoginSec,
  763.     Credit           : LongInt;
  764.     UserRecord       : Integer;
  765.     ReadThru,
  766.     NumberPages,
  767.     DownloadLimit    : Word;
  768.     TimeOfCreation   : RA_Time;
  769.     LogonPassword    : String[15];
  770.     WantChat         : Boolean;
  771.     DeductedTime     : Integer;
  772.     MenuStack        : Array[1..50] of String[8];
  773.     MenuStackPointer : Byte;
  774.     UserXIinfo       : USERSXIrecord;
  775.     ErrorFreeConnect,
  776.     SysopNext        : Boolean;
  777.     EMSI_Session     : Boolean;        { These fields hold  }
  778.     EMSI_Crtdef,                       { data related to an }
  779.     EMSI_Protocols,                    { EMSI session       }
  780.     EMSI_Capabilities,
  781.     EMSI_Requests,
  782.     EMSI_Software    : String[40];
  783.     Hold_Attr1,
  784.     Hold_Attr2,
  785.     Hold_Len         : Byte;
  786.     ExtraSpace       : Array[1..100] of Byte;
  787.   end;
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 13]
  807.  
  808. Unit Types (Continued)
  809. ----------------------
  810.  
  811. RemoteAccess PROTOCAL.RA File Structure
  812.  
  813.   PROTOCOLrecord = record
  814.     Name           : String[15];
  815.     ActiveKey      : Char;
  816.     OpusTypeCtlFile,
  817.     BatchAvailable : Boolean;
  818.     Attribute      : Byte; { 0=Disabled, 1=Enabled }
  819.     LogFileName,
  820.     CtlFileName,
  821.     DnCmdString,
  822.     DnCtlString,
  823.     UpCmdString,
  824.     UpCtlString    : String[80];
  825.     UpLogKeyword,
  826.     DnLogKeyword   : String[20];
  827.     XferDescWordNum,
  828.     XferNameWordNum : Byte;
  829.   end;
  830.  
  831.  
  832. QBBS 2.75  USERS.BBS File Structure
  833.  
  834.   Q_UserRecord  = record
  835.     Name        : String[35];
  836.     City        : String[25];
  837.     Pwd         : String[15];
  838.     DataPhone,
  839.     HomePhone   : String[12];
  840.     LastTime    : String[5];
  841.     LastDate    : String[8];
  842.     Attrib      : Byte;   --------------  Bit 0: Deleted
  843.     Flags       : FlagType;               Bit 1: Screen Clear Codes
  844.     Credit,                               Bit 2: More Prompt
  845.     Pending,                              Bit 3: ANSI
  846.     TimesPosted,                          Bit 4: No-Kill
  847.     HighMsgRead,                          Bit 5: Ignore Download Hours
  848.     SecLvl,                               Bit 6: ANSI Full Screen Editor
  849.     Times,                                Bit 7: Sex (0=male, 1=female)
  850.     Ups,
  851.     Downs,
  852.     UpK,
  853.     DownK,
  854.     TodayK      : Word;
  855.     Elapsed,
  856.     Len         : Integer;
  857.     CombinedPtr : Word; (* Record number in COMBINED.BBS *)
  858.     AliasPtr    : Word; (* Record number in ALIAS.BBS *)
  859.     Birthday    : Longint;
  860.   End;
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 14]
  869.  
  870. Unit Types (Continued)
  871. ----------------------
  872.  
  873.  
  874.   EventStat     = (Deleted, Enabled, Disabled);
  875.  
  876.  
  877.   Q_EventRecord = Record (* QBBS 2.75 EVENTCFG.DAT *)
  878.     Status      : Byte;
  879.     RunTime     : LongInt;
  880.     ErrorLevel  : Byte;
  881.     Days        : Byte;
  882.     Forced      : Boolean;
  883.     LastTimeRun : LongInt;
  884.     Spare       : Array[1..7] of Byte;
  885.   End;
  886.  
  887.   GosubDataType = array[1..20] of String[8];
  888.  
  889.  
  890. QBBS 2.75 Exitinfo.bbs File Structure
  891.  
  892.   Q_ExitRecord  = Record
  893.     BaudRate        : Integer;
  894.     SysInfo         : SysInfoRecord;
  895.     TimeLogInfo     : TimeLogRecord;
  896.     UserInfo        : Q_UserRecord;
  897.     EventInfo       : Q_EventRecord;
  898.     NetMailEntered  : Boolean;
  899.     EchoMailEntered : Boolean;
  900.     LoginTime       : String[5];
  901.     LoginDate       : String[8];
  902.     TmLimit         : Integer;
  903.     LoginSec        : LongInt;
  904.     Credit          : LongInt;
  905.     UserRecNum      : Integer;
  906.     ReadThru        : Integer;
  907.     PageTimes       : Integer;
  908.     DownLimit       : Integer;
  909.     WantChat        : Boolean;
  910.     GosubLevel      : Byte;
  911.     GosubData       : GosubDataType;
  912.     Menu            : String[8];
  913.   End;
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 15]
  931.  
  932. Unit Types (Continued)
  933. ----------------------
  934.  
  935. RemoteAccess V0.04 Exitinfo.bbs File Structure
  936.  
  937.   RA04_ExitRec  = RECORD
  938.     Baud                 : WORD ;
  939.     SysInfo              : SysInfoRecord ;
  940.     TimeLogInfo          : TimeLogRecord ;
  941.     UserInfo             : UsersRecord ;
  942.     EventInfo            : EventRecord ;
  943.     NetMailEntered       : BOOLEAN ;
  944.     EchoMailEntered      : BOOLEAN ;
  945.     LoginTime            : STRING[5] ;
  946.     LoginDate            : STRING[8] ;
  947.     TimeLimit            : WORD ;
  948.     LoginSec             : LONGINT ;
  949.     Credit               : LONGINT ;
  950.     UserRecord           : WORD ;
  951.     ReadThru             : WORD ;
  952.     NumberPages          : WORD ;
  953.     DownLoadLimit        : WORD ;
  954.     TimeOfCreation       : STRING[5] ;
  955.     LogonPassword        : STRING[15] ;
  956.     WantChat             : BOOLEAN ;
  957.   End;
  958.  
  959.  
  960. QBBS 2.66 Exitinfo.BBS File Structure
  961.  
  962.   Q_Rec         = RECORD
  963.     BaudRate:          INTEGER ;
  964.     SysInfo:           SysInfoRecord ;
  965.     TimeLogInfo:       TimeLogRecord ;
  966.     UserInfo:          UsersRecord ;
  967.     EventInfo:         EventRecord ;
  968.     NetMailEntered:    BOOLEAN ;
  969.     EchoMailEntered:   BOOLEAN ;
  970.     LoginTime:         STRING[5] ;
  971.     LoginDate:         STRING[8] ;
  972.     TmLimit:           INTEGER ;
  973.     LoginSec:          LONGINT ;
  974.     Credit:            LONGINT ;
  975.     UserRecNum:        INTEGER ;
  976.     ReadThru:          INTEGER ;
  977.     PageTimes:         INTEGER ;
  978.     DownLimit:         INTEGER ;
  979.     WantChat:          BOOLEAN ;
  980.     GosubLevel:        BYTE ;
  981.     GosubData:         GosubDataType ;
  982.     Menu:              STRING[8] ;
  983.   End;
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 16]
  993.  
  994. Unit Variables
  995. --------------
  996.  
  997.      JPDoor has some global unit variables which you can address in your 
  998.   program if necessary.  These are usually initialized upon program startup
  999.   when 'GetDorInfo' is called.   Some variables will be initialized
  1000.   automatically   when JPDoor is initialized.
  1001.  
  1002.   AFlag,
  1003.   BFlag,
  1004.   CFlag,
  1005.   DFlag          STRING[8]       These variables are initialized by the
  1006.                                  'GetDorInfo' procedure.  The current
  1007.                                  user's flag settings are read from
  1008.                                  EXITINFO.BBS and stored in these variables.
  1009.  
  1010.   ActiveCount    BYTE            Used internally in Input routines to time
  1011.                                  remote keyboard activity. This is set to
  1012.                                  InavtiveVal upon entry into any input
  1013.                                  routine, and decremented each minute, if
  1014.                                  it reaches 1, then a beep will sound on
  1015.                                  the remote terminal, and upon reaching
  1016.                                  zero, will terminate with a halt code 3.
  1017.  
  1018.   ANSI           BYTE            Set to 1 if user's ANSI setting is on,
  1019.                                  set to 0 if it is off.  Initialized by
  1020.                                  the 'GetDorInfo' procedure. Can also be
  1021.                                  5 if you use the SetGraphics function.
  1022.  
  1023.   BaudString     STRING[35]      This is the user's baud rate and com port
  1024.                                  settings.  Initialized by the 'GetDorInfo'
  1025.                                  procedure.
  1026.  
  1027.   Buffers        BOOLEAN         Initially set to FALSE, this variable deter-
  1028.                                  mines whether or not output buffering is used.
  1029.                                  When JPDoor is initialized, the DOS environ-
  1030.                                  ment variable OUTBUFF is examined.  If OUTBUFF
  1031.                                  is not set or is set to anything other than
  1032.                                  ON, Buffers is set to FALSE.  Your program
  1033.                                  can override this setting by setting Buffers
  1034.                                  within your program.  JPDoor has never util-
  1035.                                  ized output buffers prior to 2.6c.  This was
  1036.                                  to speed the action of hot-keys, when used.
  1037.                                  However, on high speed systems running under
  1038.                                  a multitasker, JPDoor would slow considerably.
  1039.                                  Setting Buffers to TRUE speeds up output.
  1040.                                  Hot-keys still work with Buffers set to TRUE
  1041.                                  although they are a bit slower.
  1042.  
  1043.  
  1044.  
  1045.   C_Back         BYTE            This variable contains the currently selected
  1046.                                  background color.  Valid attributes are as
  1047.                                  shown in the Display procedure.  Initialized
  1048.                                  by the 'SetColor' procedure.
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 17]
  1055.  
  1056. Unit Variables (Continued)
  1057. --------------------------
  1058.  
  1059.   C_Blink        BYTE            This variable contains the currently selected
  1060.                                  blinking attribute.  Valid attributes are 0
  1061.                                  and 1 (0 = off 1 = on).  Initialized by the
  1062.                                  'SetColor' procedure.
  1063.  
  1064.   C_Fore         BYTE            This variable contains the currently selected
  1065.                                  foreground color.  Valid attributes are as
  1066.                                  shown in the Display procedure.  Initialized
  1067.                                  by the 'SetColor' procedure.
  1068.  
  1069.   CheckActivity  BOOLEAN         If your program needs to spend time processing
  1070.                                  something, and you don't want the user keyboard
  1071.                                  timeout to throw him off, then set this to
  1072.                                  FALSE and it will not monitor for keyboard
  1073.                                  activity.  Carrier watch will still be active.
  1074.                                  This is automatically set to TRUE on any input
  1075.                                  routines within JPDoor, and set False after
  1076.                                  the input has occured.
  1077.  
  1078.   CkMsgs         BOOLEAN         This Variable if set to TRUE the programs
  1079.                                  compiled with Jpdoor will automatically check
  1080.                                  for online message for the current node in
  1081.                                  use, and is used by CkMsg procedure.
  1082.  
  1083.   CkExitInfo     BOOLEAN         This Variable can be set to false, JPDoor
  1084.                                  will not look for an EXITINFO.BBS file. This
  1085.                                  is handy for Someone who is writting a door
  1086.                                  that only needs information only from
  1087.                                  DORINFOX.DEF.  The default is TRUE.
  1088.  
  1089.   ClubChar       CHAR            This variable is initialized by JPDoor and
  1090.                                  contains an ascii #5 (The Club Character)
  1091.                                  This is used in the DrawCard routine.
  1092.                                  This variable is used because some terminal
  1093.                                  programs don't display the club character
  1094.                                  properly, so you may change it to another
  1095.                                  character such as a 'C'
  1096.  
  1097.  
  1098.   Counter        INTEGER         Used as a general counter. Can be used freely
  1099.                                  by the programmer.
  1100.  
  1101.  
  1102.   Date           STRING[20]      This variable is initialized by JPDoor and
  1103.                                  contains the date at which your program was
  1104.                                  started.  This is used internally and can be
  1105.                                  referenced by your program.
  1106.  
  1107.   DoorExit       PROCEDURE       This is a Null Procedure called when exiting
  1108.                                  the door.
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 18]
  1117.  
  1118. Unit Variables (Continued)
  1119. --------------------------
  1120.  
  1121.   DoorSys        BOOLEAN         This variable which is initialized to FALSE.
  1122.                                  If set to TRUE will then only read the drop
  1123.                                  file Door.Sys.  This supports both the 
  1124.                                  RA 1.xx Door.Sys or PCBoard Door.Sys.  This
  1125.                                  is read in by the GetDorinfo procedure.
  1126.  
  1127.                         NOTE:  RA 1.xx Door.Sys does not give much Information.
  1128.                         The following variables are valid :
  1129.  
  1130.                          UserName
  1131.                          UserFirst
  1132.                          UserLast
  1133.                          PortNum
  1134.                          BaudString
  1135.                          TimeRemaining
  1136.                          ANSI
  1137.  
  1138.                          The following are not supplied by Door.Sys but have
  1139.                          defaults set as listed :
  1140.  
  1141.                          SystemName    := 'BBS'
  1142.                          SysopFirst    := 'Sysop'
  1143.                          SysopLast     := ''
  1144.                          SysopName     := 'Sysop'
  1145.                          UserCityState := 'Unknown'
  1146.                          UserSecurity  := 0
  1147.  
  1148.                          The standard Door.Sys does NOT supply the following
  1149.                          info, which defaults to the values listed above :
  1150.  
  1151.                          SystemName
  1152.                          SysopName
  1153.                          SysopFirst
  1154.                          SysopLast
  1155.  
  1156.                          These variables can be changed if you wish AFTER
  1157.                          calling the GetDorinfo procedure.
  1158.  
  1159.  
  1160.   DV             BOOLEAN         True if Desqview is detected, false if not.
  1161.                                  This is initialized upon program startup.
  1162.  
  1163.   ExitInfo       ExitRec         This holds the Exitinfo.bbs info if you are
  1164.                                  loading it.
  1165.  
  1166.   ExitInfoBBSName STRING         Contains the full path and filename of the
  1167.                                  ExitInfo.Bbs file.  Initialized by the
  1168.                                  GetDorInfo procedure.
  1169.  
  1170.   ExitInfoPath   STRING          Defaults to '' until 'GetDorInfo' is called.
  1171.                                  This is the path to EXITINFO.BBS.  When
  1172.                                  'GetDorInfo' is called, the path to
  1173.                                  EXITINFO.BBS is passed to it by your program.
  1174.                                  From this point on, your routines may
  1175.                                  reference this variable if EXITINFO.BBS needs
  1176.                                  to be addressed later on in your program.
  1177.  
  1178. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 19]
  1179.  
  1180. Unit Variables (Continued)
  1181. --------------------------
  1182.   ExtendedChars  BOOLEAN         Defaults to FALSE when JPDoor is initialized.
  1183.                                  If set to TRUE by your program, JPDoor's
  1184.                                  line input routines (GetInput and GetLine)
  1185.                                  will allow entry of extended characters (i.e.
  1186.                                  control characters, ASCII characters 128 -
  1187.                                  255, etc.).  If your program does not
  1188.                                  require extended character input, you should
  1189.                                  leave this set to false.  It acts as a guard
  1190.                                  against entry of extended characters in the
  1191.                                  event of telephone line noise.
  1192.  
  1193.   ForceNode      BOOLEAN         If set to True, then JPDoor will read a
  1194.                                  Dorinfo1.def file rather than look for
  1195.                                  a dorinfo2.def if you pass a 2 as the
  1196.                                  NODE to GetDorinfo  Default is TRUE.
  1197.                                  If you wish to read a dorinfo2.def then
  1198.                                  ForceNode MUST be set to false.
  1199.  
  1200.   FossilHot      BOOLEAN         If this variable is set to TRUE, the Fossil
  1201.                                  will not be de-initialized when your program
  1202.                                  exits.
  1203.  
  1204.   FossilInstalled BOOLEAN        True if the Fossil was detected with the
  1205.                                  InitFossil procedure. False if not.
  1206.  
  1207.   FuncKey        BOOLEAN         Returns True if the last key pressed was
  1208.                                  an extended character in Charin, GetChar,
  1209.                                  GetInput, or an Extended Character Hot-Key
  1210.                                  was pressed.
  1211.  
  1212.   Hdr            MsgHdrRecord    This variable is of type MsgHdrRecord defined
  1213.                                  above, and is used in the PostMsg function.
  1214.  
  1215.   HotKey         CHAR            If you do not tell JPDoor to Kill the hotkey
  1216.                                  then this will contain the hotkey character
  1217.                                  which was pressed.
  1218.  
  1219.   HotKeyOn       BOOLEAN         Initially set to FALSE upon program startup.
  1220.                                  This variable is used internally by the
  1221.                                  unit and is set using the SetHotKeys_On and
  1222.                                  SetHotKeys_OFF procedures.  It may be used
  1223.                                  during program execution (see section on
  1224.                                  Hot-Keys) .
  1225.  
  1226.   HotKeyPressed  BOOLEAN         Initially set to FALSE upon program startup.
  1227.                                  If Hot-Keys are turned on and a valid Hot-Key
  1228.                                  is pressed, this variable will be set to
  1229.                                  TRUE.  It may be used during program
  1230.                                  execution (see section on Hot-Keys).
  1231.  
  1232.   Hr,Mn,Dum      WORD            Used internally by JPDoor for Time functions
  1233.                                  and procedures.
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 20]
  1241.  
  1242. Unit Variables (Continued)
  1243. --------------------------
  1244.  
  1245.   InactiveVal    BYTE            This is the amount of time allowed before
  1246.                                  the program is terminated due to remote user
  1247.                                  inactivity.  This value has an initial default
  1248.                                  value of 5.  If you change it, be sure to
  1249.                                  change it to any value greater than 1 as
  1250.                                  JPDoor sends a beep to the remote user one
  1251.                                  minute prior to the expiration of this
  1252.                                  value (the beep is not sent to the local
  1253.                                  console).
  1254.  
  1255.   InUseFile      String[45];     This variable is used in the GameInUse
  1256.                                  function. If InUseFile is NOT '' then  you
  1257.                                  call GameInUse which checks for the file
  1258.                                  InUseFile.  If InUseFile exists, it tells the
  1259.                                  user that the game is in use and GameInUse
  1260.                                  returns TRUE. If the file does not exist, it
  1261.                                  creates it, and GameInUse returns FALSE.
  1262.                                  NOTE: it will NOT terminate you program.
  1263.  
  1264.                                  If InUseFile = '' then GameInUse returns 
  1265.                                  False.  Make sure this gets called only once, 
  1266.                                  as it will return TRUE the second time!
  1267.  
  1268.  
  1269.   JP_Debug       BOOLEAN         Defaults to False.  If you set this to true
  1270.                                  then JPDoor will create a log file in the
  1271.                                  current directory called 'JP_Debug.Log'
  1272.                                  which will log all activity as it tries to
  1273.                                  read the dropfiles etc for your door.
  1274.                                  This is very handy in determining problems
  1275.                                  with sysops setting up your door.  The user
  1276.                                  of your software may turn this logging on
  1277.                                  by setting an environment variable as
  1278.                                  follows : SET JP_DEBUG=ON
  1279.                                  He/She would do this in the batch file
  1280.                                  which loads your door. Make sure you tell
  1281.                                  them to turn it off afterwards :
  1282.                                  SET JP_DEBUG=
  1283.  
  1284.   JPUSE          JPUSERecord     Used to update the JPDoor.Use file with
  1285.                                  information about the current user.
  1286.                                  (See section on MultiNode communications)
  1287.  
  1288.   JPUSEOther     JPUSERecord     Used to read the JPDoor.Use file for
  1289.                                  information about other users on the system.
  1290.                                  (See section on MultiNode communications)
  1291.  
  1292.   KillHotKey     BOOLEAN         Toggled True/False in the SetHotKeys_On
  1293.                                  procedure by passing either Kill or NoKill.
  1294.                                  See SetHotKeys_On procedure for example.
  1295.                                  If True, HotKeys are killed when they are
  1296.                                  detected and you will not know which key was
  1297.                                  pressed. If you wish to know which key was
  1298.                                  hit, then you will need to turn hotkeys on
  1299.                                  with NoKill.
  1300.  
  1301.  
  1302. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 21]
  1303.  
  1304. Unit Variables (Continued)
  1305. --------------------------
  1306.  
  1307.   LastChecked    INTEGER         Last time that JPDoor checked for a carrier.
  1308.                                  This is Minutes since midnight.
  1309.  
  1310.   Local          BOOLEAN         Set to TRUE if user is logged on locally.
  1311.                                  Otherwise, set to false.  Initialized by the
  1312.                                  'GetDorInfo' procedure.
  1313.  
  1314.   LocalKey       BOOLEAN         Returns TRUE if a key is pressed at the local
  1315.                                  console during a call to GetChar, GetInput,
  1316.                                  or GetLine.  This is used within the unit but
  1317.                                  may be referenced by your program.
  1318.  
  1319.   MsgBuff        ARRAY[0..100]   This is the array which will hold the lines
  1320.                  of STRING[80]   of text in the PostMsg function.
  1321.                                  MsgBuff[0] is reserved and used internally.
  1322.  
  1323.   MsgToMe        STRING[45]      This variable holds the name of an online
  1324.                                  message to this node ( IE: 'D:\RA\NODE01.RA').
  1325.  
  1326.   MsgWaiting     BOOLEAN         This boolean variable maybe referrenced 
  1327.                                  within your program.  If the value is TRUE, 
  1328.                                  an online message is waiting for the current 
  1329.                                  node is use.  Messages are checked once every
  1330.                                  60 seconds and when the status line is drawn.
  1331.                                  You can check any time using the CkMsg 
  1332.                                  procedure.
  1333.  
  1334.   MultiNode      BOOLEAN         Defaults to False.  If left at False, then
  1335.                                  none of the multinode functions and pro-
  1336.                                  cedures will work. They will simply Exit
  1337.                                  without doing anything.  If you do NOT need
  1338.                                  to use multi-node functions in your door, do
  1339.                                  not set this to true. Setting this to true
  1340.                                  will force JPDoor to read the UserOn.BBS to
  1341.                                  detect which node the user is calling on, and
  1342.                                  this can cause problems when the file
  1343.                                  structures change (beyond our control) If
  1344.                                  this is left as False, then JPDoor will only
  1345.                                  attempt to read the Door.sys or DorinfoX.def
  1346.                                  file, and Exitinfo.bbs if CkExitInfo is True.
  1347.  
  1348.  
  1349.   Node           String[2]       Node defaults to '1'. Node is used to specify
  1350.                                  which line number is in use.
  1351.  
  1352.   Portnum        BYTE            Com port in use.  If user is local then
  1353.                                  this variable is not used by the unit and
  1354.                                  need not be initialized.  Otherwise, it
  1355.                                  should be initialized to 0,1,2 or 3.  This
  1356.                                  unit supports COM1,COM2,COM3 and COM4
  1357.                                  configurations. A value of zero represents
  1358.                                  COM1.  Initialized by the 'GetDorInfo'
  1359.                                  procedure.  You should not initialize this
  1360.                                  variable manually.
  1361.  
  1362.  
  1363.  
  1364. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 22]
  1365.  
  1366. Unit Variables (Continued)
  1367. --------------------------
  1368.  
  1369.   PortStat       ARRAY[0..MAXPORT] Contains the Status word of the com ports
  1370.                  of WORD         as returned from the last call to the fossil.
  1371.  
  1372.   ProductName    STRING[20]      Defaults to NIL when JPDoor is initialized.
  1373.                                  If this variable is not NIL, it will be
  1374.                                  displayed in the status bar if StatusLineOn
  1375.                                  is set to TRUE.  This is a good place to put
  1376.                                  the name of your program or other information
  1377.                                  (i.e. [ALT-C=CHAT]).
  1378.  
  1379.  
  1380.   QBBS           BOOLEAN         In order to use any of the Multi-Node type
  1381.                                  functions and procedures, you must be running
  1382.                                  your door on either RA 1.xx or QBBS 2.75 or
  1383.                                  above.  If you read the exitinfo.bbs then it
  1384.                                  will automatically determine which it is, and
  1385.                                  set either the RA100 or QBBS boolean to true;
  1386.                                  If your NOT reading Exitinfo but wish to use
  1387.                                  the multi-node functions and procedures, then
  1388.                                  you are responsible for setting one of these
  1389.                                  to True.  Don't forget you also need to set
  1390.                                  MultiNode := True;
  1391.  
  1392.  
  1393.   RA004          BOOLEAN         If JPDoor detects a RemoteAccess V0.04 or
  1394.                                  earlier Exitinfo (if you read it) then this
  1395.                                  will be set to True and MultiNode functions
  1396.                                  and procedures will not be allowed. They will
  1397.                                  simply exit.
  1398.  
  1399.  
  1400.   RA100          BOOLEAN         In order to use any of the Multi-Node type
  1401.                                  functions and procedures, you must be running
  1402.                                  your door on either RA 1.xx or QBBS 2.75 or
  1403.                                  above.  If you read the exitinfo.bbs then it
  1404.                                  will automatically determine which it is, and
  1405.                                  set either the RA100 or QBBS boolean to true;
  1406.                                  If your NOT reading Exitinfo but wish to use
  1407.                                  the multi-node functions and procedures, then
  1408.                                  you are responsible for setting one of these
  1409.                                  to True.  Don't forget you also need to set
  1410.                                  MultiNode := True;
  1411.  
  1412.  
  1413.   RA110          BOOLEAN         This is automatically detected and set to
  1414.                                  true if the system is running RA 1.1x in
  1415.                                  order to accomodate the different file
  1416.                                  structures. All you need to set is RA100
  1417.                                  as JPDoor will set RA110 if needed.
  1418.                                  (See RA100 above)
  1419.  
  1420.   Range          CharSet         Used Internally by JPDoor to hold a set
  1421.                                  of characters. May be used by the programmer.
  1422.                                  Eg. Range := ['A','B','C'];
  1423.  
  1424.  
  1425.  
  1426. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 23]
  1427.  
  1428. Unit Variables (Continued)
  1429. --------------------------
  1430.  
  1431.   Raxit          BOOLEAN         Defaults to FALSE. If true, then JPDoor will
  1432.                                  monitor the semaphore directory for a
  1433.                                  RAXITn.eee file which RemoteAccess uses to
  1434.                                  force a node to exit with a specific error-
  1435.                                  level. See ChkRAXIT procedure below.
  1436.  
  1437.  
  1438.   Scrap_Entry    STRING          Used by GetLine function. See reference to
  1439.                                  GetLine below.
  1440.  
  1441.   ScrLen         BYTE            Defaults to 24 when JPDoor is initialized.
  1442.                                  This is the user's screen length.  When
  1443.                                  'GetDorInfo' is called, the screen length
  1444.                                  of the current user is read from
  1445.                                  EXITINFO.BBS.  If the user's screen length
  1446.                                  setting is not equal to 0, it will be
  1447.                                  assigned to ScrLen.  Otherwise, 24 will
  1448.                                  remain the default.
  1449.  
  1450.   SemaphorePath  STRING[45]      With RemoteAccess 1.10 you may specify
  1451.                                  a semaphore directory. This is where all
  1452.                                  inter-node communication files are located,
  1453.                                  eg. NODE1.RA NODE2.RA etc...  If you wish
  1454.                                  your program to send/receive online messages
  1455.                                  from other nodes, you will be required to
  1456.                                  put the path in this variable.
  1457.  
  1458.   ShowWindow     BOOLEAN         This boolean variable which defaults to 
  1459.                                  TRUE. If set to FALSE will cause JPDoor's
  1460.                                  blow up window, which is normally shown for
  1461.                                  about 1 second at start up of a program
  1462.                                  execution, to be supressed.
  1463.  
  1464.   Snoop          BOOLEAN         Defaults to TRUE when JPDoor is
  1465.                                  initialized.  If set to FALSE by your
  1466.                                  program, Snoop mode is turned OFF and no
  1467.                                  text will be displayed to the local
  1468.                                  console.
  1469.  
  1470.   SoFar          STRING          This is a temporary variable used by the
  1471.                                  GetInput and GetLine routines.  If for some
  1472.                                  reason input should be interrupted (i.e. a
  1473.                                  SysopKey or UserKey is pressed) the text typed
  1474.                                  "so far" is contained in this variable and
  1475.                                  may be redisplayed, processed or ignored.
  1476.  
  1477.   StatLineA      Array[1..10]    These string variables can be used to change
  1478.                  of StatStr;     the contents of the sysop status bars.
  1479.  
  1480.   StatLineB      Array[1..10]    This variable as discribed in above statement
  1481.                  of StatStr;     can be used to change the contents of the
  1482.                                  second line of the sysop status bars.
  1483.  
  1484.  
  1485.  
  1486.  
  1487.  
  1488. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 24]
  1489.  
  1490. Unit Variables (Continued)
  1491. --------------------------
  1492.  
  1493.   StatusBar      BYTE            This is used to tell the ShowStatus procedure
  1494.                                  which status bar to display.  Hitting the
  1495.                                  function keys will toggle this byte, but
  1496.                                  you may also give it a value, and then call
  1497.                                  ShowStatus if for some reason you need to
  1498.                                  control which bar is available. For instance
  1499.                                  you may wish to Ask the user for a reason to
  1500.                                  chat, put the reason in StatLineA[6] (Like
  1501.                                  RemoteAccess) and then display that status
  1502.                                  bar if there is no answer to the page.
  1503.  
  1504.  
  1505.   StatusLineOn   BOOLEAN         This is the current setting of the Status
  1506.                                  Bar.  If set to TRUE, the last two lines of
  1507.                                  the local screen will contain a Status Bar
  1508.                                  with the current online user information.
  1509.                                  Initialized by JPDoor with a default setting
  1510.                                  of FALSE.  To turn the Status Bar on, simply
  1511.                                  set this variable to TRUE.
  1512.  
  1513.   StoreMenu      STRING[8]       If the program is run on a QuickBBS 2.64
  1514.                                  system, JPDoor will automatically convert
  1515.                                  EXITINFO.BBS to RemoteAccess 0.03 format. In
  1516.                                  doing so, JPDoor, stores the name of the menu
  1517.                                  to return to in this variable.  When your
  1518.                                  program exits and converts EXITINFO.BBS back
  1519.                                  to QuickBBS 2.64 format, the value of this
  1520.                                  variable will be restored in EXITINFO.BBS.
  1521.  
  1522.   SysopFirst     STRING[35]      This is the Sysop's first name as read from
  1523.                                  the DORINFO1.DEF file.  Initialized by the
  1524.                                  'GetDorInfo' procedure.
  1525.  
  1526.   SysopKey       ARRAY [1..20]   This variable stores valid Sysop (local)
  1527.                  OF STRING[2]    extended keys that may be read during a call
  1528.                                  to GetChar, GetLine or GetInput.  See
  1529.                                  'Getting Started With JPDoor' for more
  1530.                                  information.
  1531.  
  1532.   SysopKeysOn    BOOLEAN         Must be set to true if you wish to use the
  1533.                                  Extended key input and SysopKeys. Defaults
  1534.                                  to False.
  1535.  
  1536.   SysopLast      STRING[35]      This is the Sysop's last name as read from
  1537.                                  the DORINFO1.DEF file.  Initialized by the
  1538.                                  'GetDorInfo' procedure.
  1539.  
  1540.   SysopName      STRING[35]      This is the Sysop's name as read from the
  1541.                                  DORINFO1.DEF file. Initialized by the
  1542.                                  'GetDorInfo' procedure and returned in
  1543.                                  mixed case.
  1544.  
  1545.   SystemName     STRING          Contains the name of the BBS as read from
  1546.                                  the DORINFO1.DEF file. Initialized by the
  1547.                                  'GetDorInfo' procedure.
  1548.  
  1549.  
  1550. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 25]
  1551.  
  1552. Unit Variables (Continued)
  1553. --------------------------
  1554.  
  1555.   SysopProc      ARRAY [1..20]   This variable stores the list of Sysop far
  1556.                  OF PROCEDURE    call procedures as defined by the programmer.
  1557.                                  See 'Getting Started With JPDoor' for more
  1558.                                  information.
  1559.  
  1560.   ThisNode       STRING[2]       Defaults to 01  This is used in the status
  1561.                                  bar display to show which Line : the user
  1562.                                  is calling on.  It is up to you to put a
  1563.                                  different value in here for each node. I
  1564.                                  recommend getting it on the command line,
  1565.                                  or from a config file.
  1566.  
  1567.   Time           STRING[10]      This variable is initialized by JPDoor and
  1568.                                  contains the time at which your program was
  1569.                                  started.  This is used internally and can be
  1570.                                  referenced by your program.
  1571.  
  1572.  
  1573.   TimeRemaining  INTEGER         This is the user's time remaining in
  1574.                                  minutes.  Once initialized, JPDoor's I/O
  1575.                                  functions will keep track of this variable
  1576.                                  and decrement it as needed.  If this variable
  1577.                                  reaches a value less than 1, a halt code of 2
  1578.                                  will be returned. You should use the
  1579.                                  TrapExit.Pas program to handle this program
  1580.                                  halt accordingly.  Initialized by the
  1581.                                  'GetDorInfo' procedure.
  1582.  
  1583.   TxtIOBuffer    ARRAY[1..4096]  This is a buffer set up for use with JPDoor
  1584.                  of CHAR         internal Text File reading. You are free to
  1585.                                  use this buffer for your own Text File I/O
  1586.                                  If your interested, read up on the SetTextBuf
  1587.                                  procedure in your TurboPascal reference
  1588.                                  manual.
  1589.  
  1590.   UseHandle      BOOLEAN         Show User HANDLES rather than real names
  1591.                                  in the UserOnNode and Whoson procedures.
  1592.                                  Defaults to False.
  1593.  
  1594.   UseLock        BOOLEAN         If share is loaded and detected on the
  1595.                                  system, then UseLock will be set to true
  1596.                                  and record locking will be enabled. If
  1597.                                  share is not loaded, then UseLock will
  1598.                                  be set to false and the record locking
  1599.                                  functions will simply exit without attempting
  1600.                                  to lock records.
  1601.  
  1602.   UserCityState  STRING          This is the user's city and state as read
  1603.                                  from the DORINFO1.DEF file and as defined
  1604.                                  in the user's record in USERS.BBS.
  1605.                                  Initialized by the 'GetDorInfo' procedure.
  1606.  
  1607.   UserFirst      STRING[35]      This is the user's first name as read from
  1608.                                  the DORINFO1.DEF file.  Initialized by the
  1609.                                  'GetDorInfo' procedure.
  1610.  
  1611.  
  1612. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 26]
  1613.  
  1614. Unit Variables (Continued)
  1615. --------------------------
  1616.  
  1617.   UserKey        ARRAY [1..20]   This variable stores valid User (remote)
  1618.                  OF STRING[2]    extended keys that may be read during a call
  1619.                                  to GetChar, GetLine or GetInput.  See
  1620.                                  'Getting Started With JPDoor' for more
  1621.                                  information.
  1622.  
  1623.   UserKeysOn     BOOLEAN         Must be set to True if you wish to allow user
  1624.                                  extended keys and UserKey. Defaults to False.
  1625.  
  1626.   UserLast       STRING[35]      This is the user's last name as read from
  1627.                                  the DORINFO1.DEF file.  Initialized by the
  1628.                                  'GetDorInfo' procedure.
  1629.  
  1630.   UserName       STRING[35]      This is the user name as read from the
  1631.                                  DORINFO1.DEF file.  If one word names are
  1632.                                  allowed, the last name is not used since
  1633.                                  it is a blank line in DORINFO1.DEF.
  1634.                                  Initialized by the 'GetDorInfo' procedure.
  1635.                                  Which will return in Mixed case.
  1636.  
  1637.   UserProc       ARRAY [1..20]   This variable stores the list of user far
  1638.                  OF PROCEDURE    call procedures as defined by the programmer.
  1639.                                  See 'Getting Started With JPDoor' for more
  1640.                                  information.
  1641.  
  1642.   UserSecurity   WORD            This is the user's security level as read
  1643.                                  from the DORINFO1.DEF file.  It is converted
  1644.                                  from a string to an integer.  Initialized by
  1645.                                  the 'GetDorInfo' procedure.
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 27]
  1675.  
  1676. Halt Codes
  1677. ----------
  1678.  
  1679.      The file TrapExit.Pas is an include file containing a far call
  1680.   procedure called TRAPEXIT.  This procedure's function is to trap HALT
  1681.   codes from within your program.  For example, unexpected exits for
  1682.   reasons like dropped carrier, user inactivity timeouts etc. should be
  1683.   trapped and handled here.
  1684.  
  1685.      JPDoor reserves HALT codes 0 through 10.  If you use any HALT
  1686.   statements in your code, you should use HALT codes above 10.
  1687.  
  1688.      HALT codes returned by JPDoor functions/procedures are as follows:
  1689.  
  1690.  
  1691.             Code    Description
  1692.             ----    ---------------------------------------------
  1693.               0      Normal program termination
  1694.               1      Carrier lost
  1695.               2      Time limit exceeded
  1696.               3      User inactive for InactiveVal+ minutes
  1697.               4      Dorinfo1.Def file not found
  1698.               5      ExitInfo.BBS file not found
  1699.               6      Directory change or directory read error
  1700.               7      CTS - Clear To Send flow Control error
  1701.               8      Forced Exit via RAXit Semaphore
  1702.               9      Door.Sys file not found
  1703.              10      Reserved for future use
  1704.  
  1705.  
  1706.      For a demonstration of how these are used, see Getting Started With
  1707.   JPDoor.  If you decide to use halt codes within your program, make sure
  1708.   that you do not use any of the codes listed above (with the exception 
  1709.   of halt code zero).
  1710.  
  1711.  
  1712.  
  1713.  
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 28]
  1737.  
  1738. REFERENCE:
  1739. ----------
  1740.  
  1741. Functions and Procedures:
  1742. -------------------------
  1743.  
  1744. The following functions and procedures are listed in the format:
  1745.  
  1746. =============================================================================
  1747.  
  1748. - Function or Procedure Name                    (internal) (external)
  1749.  
  1750. - Function or Procedure Interface Structure
  1751.  
  1752. -      Description
  1753.  
  1754. - Usage Example
  1755.  
  1756. NOTE:  An indication of 'internal' and/or 'external' is indicated to
  1757.        the right of the function or procedure name.  This indicates 
  1758.        the use of the function or procedure as noted below:
  1759.  
  1760.        internal          - function/procedure is used by the unit 
  1761.                            itself and is not required to be used by 
  1762.                            your program.
  1763.  
  1764.        external          - function/procedure is designed for use by your
  1765.                            program and is not used by the unit itself.
  1766.  
  1767.        internal/external - function/procedure is used by the unit itself but
  1768.                            it is also designed for use by your program.
  1769.  
  1770.  
  1771.  
  1772. =============================================================================
  1773.  
  1774. Function Ask_YN                                 (external)
  1775.  
  1776. ASK_YN( Prompt : TextString ; Color : BYTE) : CHAR ;
  1777.  
  1778.      Asks for a yes/no response (Y/N) with a variable prompt string using
  1779. the defined 'Color'. Once the user hits either Y or N the prompt and answer
  1780. will be removed from the screen by backspacing over it.
  1781.  
  1782. Prompt := 'Are you sure? (Y/N) ' ;
  1783. Answer := ask_yn(prompt, 2) ;
  1784.  
  1785.      The only valid keys are Y and N.  All others will be ignored.
  1786.  
  1787. =============================================================================
  1788.  
  1789.  
  1790.  
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 29]
  1799.  
  1800. Functions and Procedures (Continued)
  1801. ------------------------------------
  1802.  
  1803. Procedure AscFile                               (external)
  1804.  
  1805. AscFile(AsciiFile : String);
  1806.  
  1807.      This is good for displaying Help files or etc, that do not have
  1808. embedded control codes which need to be expanded.   The following 
  1809. commands  will work with the display output : S for Stop and P to Pause
  1810. are valid Hotkeys during output, and the More prompting is in effect
  1811. with the prompt of : Continue? (Y/n/=)  Yes default on hitting the enter
  1812. key.  n for No, and = for continous.
  1813.  
  1814. =============================================================================
  1815.  
  1816. Procedure BackSpace                             (external)
  1817.  
  1818. BackSpace( BckSp : CHAR) ;
  1819.  
  1820.      This procedure will write a destructive backspace and allows you
  1821. to define the character to leave behind.  For example, if you wanted a
  1822. completely destructive backspace (no character left behind) you would 
  1823. specify the space (ASCII #32) character.
  1824.  
  1825. FOR i := 1 TO LENGTH(PromptStr) DO BackSpace(#32) ;
  1826.  
  1827. =============================================================================
  1828.  
  1829. Function Carrier                                (internal)
  1830.  
  1831. Carrier : BOOLEAN ;
  1832.  
  1833.      Returns TRUE if carrier is detected on com port 'PortNum'.  This
  1834. function is called by other functions within the unit. If LOCAL is true
  1835. the Carrier will ALWAYS return True.
  1836.  
  1837. IF NOT Carrier THEN WRITELN('No carrier detected') ;
  1838.  
  1839. =============================================================================
  1840.  
  1841. Function Center                                 (external)
  1842.  
  1843. Center(StrToAdjust : String; LineLen : Integer) : String ;
  1844.  
  1845.      This will Center a string within a line of LineLen Long.
  1846.  
  1847. Example:  
  1848. Display(0,15,0,Center('TITLE',80));
  1849.  
  1850. Would Center TITLE on the line on the screen but will NOT write blanks after
  1851. the string to be centered.
  1852.  
  1853. =============================================================================
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 30]
  1861.  
  1862. Functions and Procedures (Continued)
  1863. ------------------------------------
  1864.  
  1865.  
  1866. Function CenterFill                             (external)
  1867.  
  1868. Center(StrToAdjust : String; LineLen : Integer) : String ;
  1869.  
  1870.      This will Center a string within a line of LineLen Long.
  1871.  
  1872. Example:  
  1873. Display(0,15,0,Center('TITLE',80));
  1874.  
  1875.         Would Center TITLE on the line on the screen and will write
  1876.         blanks after the string to be centered.  This is usefull if
  1877.         you are wanting to center text on a line using a background
  1878.         color bar.
  1879.  
  1880. =============================================================================
  1881.  
  1882. Function ChangeCase                             (external)
  1883.  
  1884. ChangeCase(Instr:STRING[80]) : STRING[80] ;
  1885.  
  1886.      Converts string 'Instr' to upper case characters.
  1887.  
  1888. NameString := ChangeCase(NameString) ;
  1889.  
  1890. =============================================================================
  1891.  
  1892. Function CharIn                                 (internal)
  1893.  
  1894. CharIn : CHAR ;
  1895.  
  1896.         Assigns an incoming character to Charin.  If local is FALSE
  1897.         then input is received from the com port 'PortNum'.  If local
  1898.         is TRUE then input is received from the local keyboard.  This
  1899.         function is called by character input functions within the unit.
  1900.  
  1901. Ch := CharIn ;
  1902.  
  1903. =============================================================================
  1904.  
  1905.  
  1906. Procedure CharOut                               (internal)
  1907.  
  1908. CharOut(Ch:CHAR) ;
  1909.  
  1910.         Outputs a single character to the com port 'PortNum'.
  1911.         This function is called by the character output routines
  1912.         within the unit.
  1913.  
  1914. CharOut('a') ;
  1915.  
  1916. =============================================================================
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 31]
  1923.  
  1924. Functions and Procedures (Continued)
  1925. ------------------------------------
  1926.  
  1927. Procedure ChkConnect                            (internal)
  1928.  
  1929. ChkConnect;
  1930.  
  1931.   This procedure is constantly called from within JPDoor and checks for a
  1932. carrier if LOCAL is true.  It also updated the status bar and checks for
  1933. online messages if CKMSGS is true, and RemoteAccess Semaphore RAXITn.???
  1934. files if RAXIT is True. There should be no reason for you to call this
  1935. procedure yourself, although you may if you wish.
  1936.  
  1937. =============================================================================
  1938.  
  1939. Procedure ChkMsg                                (internal)
  1940.  
  1941. ChkMsg : Boolean ; 
  1942.  
  1943.   This procedure which is called by JPDoor 3.2 once every minute, will check
  1944. to see if there is an online message for the node that your door is running
  1945. from.  If a message is waiting then MsgWaiting will be set to TRUE.  If your
  1946. running on RA 1.xx then you must ensure that the SemaphorePath variable holds
  1947. the path to the semaphore directory, otherwise the current directory will be
  1948. used, and you will not be able to send or recieve online messages.
  1949.  
  1950. ============================================================================
  1951.  
  1952. Procedure ChkRAXIT                             (Internal)
  1953.  
  1954. ChkRAXIT : Boolean ;
  1955.  
  1956.   This procedure which is called by JPDoor 3.2 once every minute, will check
  1957. to see if the sysop has forced this node down using the RAXIT semaphore file.
  1958. This is only valid when running on a RemoteAccess System, and the following
  1959. conditions must be met before this procedure will work.
  1960.  
  1961.  - Boolean Variable RAXIT must be True.
  1962.  - Boolean Variable RA100 MUST be True. This will automatically be set to
  1963.    True if your door reads the exitinfo.bbs and JPDoor detects that it is
  1964.    a version 1.00 or greater. If your door does not read the exitinfo.bbs
  1965.    then you will need to set this yourself.
  1966.  - SemaphorePath MUST point to the RA Semaphore directory. This can be
  1967.    accomplished in one of 3 ways. You may read it from the CONFIG.RA file
  1968.    yourself, or get it from the sysop in your configuration file for your
  1969.    door, OR have the sysop set an environment variable RASEM to point to
  1970.    this directory.
  1971.  
  1972.  You will also need to ensure that the variable ThisNode contains the correct
  1973.  node number. This can be accomplished by reading the node number from the
  1974.  command line and assigning it to this variable. ThisNode defaults to '01'
  1975.  and will cause problems if the sysop forces node 1 down, and your door has
  1976.  not put the proper value in this variable.
  1977.  
  1978. ============================================================================
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 32]
  1985.  
  1986. Functions and Procedures (Continued)
  1987. ------------------------------------
  1988.  
  1989. Function CkPath                                (internal/external)
  1990.  
  1991. CkPath(InPath : STRING) : STRING ;
  1992.  
  1993.      This function is similar to FixPath except it does not check the validity
  1994. of the directory path 'InPath'.  CkPath checks the last character of 'InPath'.
  1995. If it is not a backslash ('\') character, CkPath will append a backslash
  1996. character to the end of 'InPath'.
  1997.  
  1998. TempPath := '\RA' ;
  1999. TempPath := CkPath(TempPath) ;
  2000.  
  2001. Results in:
  2002.  
  2003. TempPath = '\RA\'
  2004.  
  2005. =============================================================================
  2006.  
  2007. Procedure ClearRegs                             (external/internal)
  2008.  
  2009. ClearRegs;
  2010.  
  2011.         This procedure fills the Regs variable (used for DOS calls etc)
  2012.         with #0's. Use this prior to making a DOS call to insure that
  2013.         previous Regs data does not interfere with your DOS call.
  2014.  
  2015.  
  2016. =============================================================================
  2017.  
  2018. Procedure ClearScreen                           (external)
  2019.  
  2020. ClearScreen ;
  2021.  
  2022. This procedure will clear the local and remote video display.  This must be
  2023. called rather than the CLRSCR procedure in CRT or if the status line is on,
  2024. it will be erased by CRT.CLRSCR.
  2025.  
  2026. Functions of ClearScreen:
  2027.  
  2028.     1. If status line is on, local screen lines 1-23 are erased, lines
  2029.        24 and 25 are left intact. Remote terminal lines 1-25 are erased.
  2030.  
  2031.     2. If status line is off, local screen lines 1-25 are erased. Remote
  2032.        terminal lines 1-25 are erased.
  2033.  
  2034. =============================================================================
  2035.  
  2036. Function CommaStr                               (external)
  2037.  
  2038. CommaStr ( N : LONGINT ) : STRING;
  2039.  
  2040.         This function will take the numeric value passed to it, and return it
  2041. in a string which will have the commas inserted in the correct places.
  2042.  
  2043. Example: CommaStr(1024)
  2044. would return '1,024'
  2045. =============================================================================
  2046. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 33]
  2047.  
  2048. Functions and Procedures (Continued)
  2049. ------------------------------------
  2050.  
  2051. Procedure Crlf                                  (external)
  2052.  
  2053. Crlf ;
  2054.  
  2055.      This procedure will echo a carriage-return, line-feed sequence to
  2056. both the local console and com port 'PortNum'.  This procedure is used
  2057. frequently in place of writeln when used to provide a carriage-return,
  2058. line-feed sequence.
  2059.  
  2060. Crlf ;
  2061.  
  2062. =============================================================================
  2063.  
  2064. Procedure CursorPos                             (external)
  2065.  
  2066. CursorPos(Row, Column : BYTE) ;
  2067.  
  2068.      Positions the cursor on 'Row' and 'Column' if ANSI is set to 1.  If
  2069. ANSI is set to 0, this procedure will exit.  CursorPos will also exit if
  2070. 'Row' is less than 0 or greater than 25 and/or if 'Column' is less than 0
  2071. or greater than 80.
  2072.  
  2073. CursorPos(25,1) ;
  2074.  
  2075.      Positions the cursor on 'Row' (line) 25, 'Column' 1.
  2076.  
  2077. =============================================================================
  2078.  
  2079. Function DateStr                                (external/internal)
  2080.  
  2081. DateStr : String;
  2082.  
  2083.   Returns the current date as MM-DD-YY
  2084.  
  2085.   Display(0,15,0,'The Current Date Is ' + DateStr);
  2086.  
  2087. =============================================================================
  2088.  
  2089. Procedure DecreaseTime                         (internal)
  2090.  
  2091. DecreaseTime ;
  2092.  
  2093.      Decrements the unit variable 'TimeRemaining' by 1 and checks to
  2094. see if 'TimeRemaining' is less than 1.  If it is, then a halt code of 
  2095. 2 is returned to the TrapExit procedure.  Your program should handle 
  2096. this accordingly.  This procedure is called by other functions within
  2097. the unit that keep track of carrier, time limits and user inactivity.
  2098.  
  2099. BEGIN
  2100.    FOR i := 1 TO 5 DO DecreaseTime ;
  2101. END ;
  2102.  
  2103. =============================================================================
  2104.  
  2105.  
  2106.  
  2107.  
  2108. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 34]
  2109.  
  2110. Functions and Procedures (Continued)
  2111. ------------------------------------
  2112.  
  2113. Procedure DecTime                               (external)
  2114.  
  2115. DecTime(TimeInc:INTEGER) ;
  2116.  
  2117.      Same as IncTime but decrements time remaining in the files EXITINFO.BBS
  2118.      and DORINFO1.DEF in the 'ExitInfoPath' directory.
  2119.  
  2120. DecTime(20) ;
  2121.  
  2122.      NOTE: This procedure should only be called when the program is ended and
  2123.      before control returns to the BBS.
  2124.  
  2125.      See also: IncTime
  2126.  
  2127. =============================================================================
  2128.  
  2129. Procedure DeleteFile                            (external)
  2130.  
  2131. DeleteFile ( FileToDelete : STRING ) ;
  2132.  
  2133.         Use this procedure to easily delete files using a filename.
  2134.  
  2135. Example:
  2136.  
  2137. DeleteFile('C:\DOOR\FILE.TMP');
  2138.  
  2139. =============================================================================
  2140.  
  2141. Procedure DepositTime                           (external)
  2142.  
  2143. DepositTime(Path : STRING[255] ; Name : STRING[30] ; n : INTEGER) ;
  2144.  
  2145.      This is used in conjunction with time banking support using RATS 0.1c
  2146. (RemoteAccess TimeBank System) or later.  THEBANK.EXT is also supported by
  2147. QuickBank (David Kuhn) and The Bank 1.0 or later (David Hazelton) time banks.
  2148.      This procedure will append to or create the file THEBANK.EXT in the
  2149. directory set by the 'Path' parameter.  'N' minutes will be deposited in 
  2150. the account of 'Name'.  'N' may be a negative number as well (for automatic
  2151. time withdrawing).
  2152.  
  2153.      NOTE:  'Path' should be the path to the directory which contains the bank
  2154.      program files.
  2155.  
  2156. DepositTime('','JOHN DOE',20) ;
  2157.  
  2158.      Deposits 20 minutes to the user JOHN DOE's account, writing to THEBANK.EXT
  2159. in the current directory.
  2160.  
  2161. DepositTime('\RA\','JOHN DOE',-20) ;
  2162.  
  2163.      Withdraws 20 minutes from the user JOHN DOE's account, writing to
  2164. THEBANK.EXT in the \RA\ directory.  Note: When specifying a path, the 
  2165. trailing backslash is required.
  2166.  
  2167.      NOTE:  'Name' MUST be in upper case only in order for The Bank to apply
  2168.      the credit to the user's account.
  2169. =============================================================================
  2170. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 35]
  2171.  
  2172. Functions and Procedures (Continued)
  2173. ------------------------------------
  2174.  
  2175. Procedure Display                               (external)
  2176.  
  2177. Display(BackGround,ForeGround,Blink:BYTE ; Line:STRING[80]) ;
  2178.  
  2179.      This procedure displays the line ('Line') to both local and remote. 
  2180. It is much like the writeln procedure except that it also requires color
  2181. attributes.   The color attributes 'BackGround' and 'ForeGround' must be
  2182. within the range of the table given below.  The 'Blink' attribute must be
  2183. a 0 (non-blinking) or a 1 (blinking).  Valid color attributes are listed
  2184. below.
  2185.                 Valid Background Attributes:
  2186.             0  : black                  4  : red
  2187.             1  : blue                   5  : magenta
  2188.             2  : green                  6  : brown
  2189.             3  : cyan                   7  : light gray
  2190.  
  2191.                 Valid Foreground attributes:
  2192.    0  : black    4  : red           8  : dark gray     12  : light red
  2193.    1  : blue     5  : magenta       9  : light blue    13  : light magenta
  2194.    2  : green    6  : brown        10  : light green   14  : yellow
  2195.    3  : cyan     7  : light gray   11  : light cyan    15  : white
  2196.  
  2197. Display(0,15,0,'This is a white line') ;
  2198. Display(7,0,0,'This line is in reverse video') ;
  2199. Display(0,1,0,'This line is blue') ;
  2200. Display(0,9,1,'This is a light blue, blinking line') ;
  2201.  
  2202.      NOTE:  If you wish to shorten the Display or sDisplay procedures, you
  2203.      might want to write your own procedure that in turn calls Display or
  2204.      sDisplay.  For example:
  2205.  
  2206. PROCEDURE Println(ForeGround : BYTE ; LineToPrint : TextString) ;
  2207. BEGIN
  2208.   Display(0,ForeGround,0,LineToPrint) ;
  2209. END ;
  2210.  
  2211. PROCEDURE Print(ForeGround : BYTE ; LineToPrint : TextString) ;
  2212. BEGIN
  2213.   sDisplay(0,ForeGround,0,LineToPrint) ;
  2214. END ;
  2215.  
  2216.      This would be good for shortening the coding of a program when there
  2217. is no need to use background colors or blinking characters.
  2218.  
  2219. =============================================================================
  2220.  
  2221.  
  2222.  
  2223.  
  2224.  
  2225.  
  2226.  
  2227.  
  2228.  
  2229.  
  2230.  
  2231.  
  2232. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 36]
  2233.  
  2234. Functions and Procedures (Continued)
  2235. ------------------------------------
  2236.  
  2237. Procedure DisplayLoc                            (external)
  2238.  
  2239. DisplayLoc(BackGround,ForeGround,Blink:BYTE ; Line:STRING[80]) ;
  2240.  
  2241.      This procedure displays the line ('Line') to local console only. 
  2242. This procedure should be used instead of WRITELN when displaying text 
  2243. to the local console only.  If StatusLineON is set to TRUE, this procedure
  2244. will take care of scrolling the screen window properly.
  2245.  
  2246.      Valid color attributes are as shown in the Display procedure.
  2247.  
  2248. BEGIN
  2249.    IF NOT EXIST('MyFile.Txt') THEN BEGIN
  2250.       DisplayLoc(0,15,1,#7 + 'MYFILE.TXT NOT FOUND') ;
  2251.       HALT(15) ;
  2252.    END ;
  2253. END ;
  2254.  
  2255. =============================================================================
  2256.  
  2257. Procedure DrawCard                             (external)
  2258.  
  2259. DrawCard(CardNum:STR2; Suit:CardSuit; Row, Col, CardColor:BYTE; Edge:BOOLEAN);
  2260.  
  2261. This procedure allows you to draw ANSI graphic playing cards within your
  2262. door.  Each card is 3 rows high by 5 columns wide.  BLACK cards are displayed
  2263. back on grey, RED cards are displayed red on grey.  CardColor will allow you
  2264. to draw different colors of blank cars.  If it is 0 it will default to 7.
  2265. The interface for DrawCard is:
  2266.  
  2267. Where: 'CardNum' is 'A' through '9', '10', 'J', 'Q', OR 'K' OR 'B' for Blank.
  2268.        'Suit'    is  C, D, H or S (for the clubs, diamonds, hearts or spades).
  2269.        'Row'     is the row where the card is to be drawn.
  2270.        'Col'     is the column where the card is to be drawn.
  2271.        'CardColor' is the color of the blank cards
  2272.        'Edge'    if True, a border will be drawn around the card.
  2273.  
  2274. This procedure will exit if ANSI is set to 0.  
  2275. =============================================================================
  2276.  
  2277. Function Exist                                  (internal/external)
  2278.  
  2279. Exist(InFile:STRING[255]) : BOOLEAN ;
  2280.  
  2281. Returns true if specified file exits or false if it doesn't.
  2282.  
  2283. BEGIN
  2284.    IF NOT Exist('Dorinfo1.Def') THEN BEGIN
  2285.       DisplayLoc(0,15,0,'Dorinfo1.Def not found') ;
  2286.       HALT(5) ;
  2287.    END ;
  2288. END ;
  2289.  
  2290. =============================================================================
  2291.  
  2292.  
  2293.  
  2294. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 37]
  2295.  
  2296. Functions and Procedures (Continued)
  2297. ------------------------------------
  2298.  
  2299. Procedure ExitJP                                (internal)
  2300.  
  2301. ExitJP;
  2302.  
  2303.       This is called internally by JPDoor. There is NO reason for you to
  2304.       call this routine. It does any EXITINFO.BBS re-conversions needed,
  2305.       and if FossilHot := False, it de-initializes the fossil driver before
  2306.       exiting JPDoor.
  2307.  
  2308. =============================================================================
  2309.  
  2310.  
  2311. Function FixPath                                (internal/external)
  2312.  
  2313. FixPath(Instr:STRING[255]) : STRING[255] ;
  2314.  
  2315.      Returns a fixed path based on 'Instr'.  Specifically, this function
  2316. is intended to append a backslash (\) character to the end of the specified
  2317. path if one is not already specified.  FixPath also qualifies the path
  2318. by checking whether or not the path actually exists and attempts to change
  2319. to that directory and back again.  If FixPath encounters an error while
  2320. attempting to change directories, a halt code of 6 is returned and the
  2321. program is aborted (see also halt codes).
  2322.  
  2323. TPath := '\RA\Doors' ;          { a sample possible path parameter         }
  2324. TPath := FixPath(TPath) ;       { '\' is appended and the directory        }
  2325.                                 {  \RA\Doors\ is tested                    }
  2326. GetDorInfo(node, TPath) ;       { the path can now be used with confidence }
  2327.  
  2328. =============================================================================
  2329.  
  2330. Procedure FlushCommBuffer                       (internal)
  2331.  
  2332. FlushCommBuffer ;
  2333.  
  2334.      If 'Local' is TRUE, this procedure will flush the com port 'PortNum'
  2335. incoming character buffer.  This procedure is called by other functions
  2336. within the unit.
  2337.  
  2338. =============================================================================
  2339.  
  2340. Function FormatStr                              (external)
  2341.  
  2342. FormatStr(Instr:STRING[80]) : STRING[80] ;
  2343.  
  2344. Formats string 'Instr' so that the first letter of each word is shifted to
  2345. upper case and all other characters are shifted to lower case.
  2346.  
  2347. VAR
  2348.   ExampleString  : STRING[80] ;
  2349. BEGIN
  2350.   ExampleString := 'this is an example' ;
  2351.   ExampleString := FormatStr(ExampleString) ;
  2352. END ;
  2353.  
  2354. Would result in: 'This Is An Example'
  2355. =============================================================================
  2356. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 38]
  2357.  
  2358. Functions and Procedures (Continued)
  2359. ------------------------------------
  2360.  
  2361. Function GameInUse                              (external)
  2362.  
  2363. GameInUse : BOOLEAN ;
  2364.  
  2365.     This function is use in conjuction with the InUseFile (string)
  2366. variable. If InUseFile specifies a filename, then this function will
  2367. create that file, and return False. This means the door is NOT in use
  2368. at this time.  If the file exists, then it assumes that someone is using
  2369. the door, displays a notice, and returns True. If your door is not
  2370. multi-node aware, then you should use this to make sure ony one person
  2371. is using it.
  2372.  
  2373. Example:
  2374.  
  2375.  InUseFile := 'MyDoor.on';
  2376.  If GameInUse then Halt(0);
  2377.  
  2378. If GameInUse returns true, the following notice will be displayed to the
  2379. user:
  2380.  
  2381.   'ProductName' is currently being played by 'UserName' on another node.
  2382.  
  2383.   Please Try Again Later...
  2384.  
  2385.   Hit RETURN To Continue :
  2386.  
  2387. Where ProductName is the name of your door as defined by ProductName, and
  2388. UserName is the name of the User who is playing.
  2389.  
  2390.  
  2391. ============================================================================
  2392.  
  2393. Procedure GameNotInUse                          (external)
  2394.  
  2395. GameNotInUse;
  2396.  
  2397.      This procedure is used if you have invoked the function GameInUse.
  2398. If InUseFile <> '' and it exists (which is created by GameInUse) then the
  2399. file is removed.  YOU are responsible for making sure this function is called
  2400. before exiting your door or no-one else will get to play!
  2401.  
  2402. ============================================================================
  2403.  
  2404. Procedure GameScreen                            (external)
  2405.  
  2406. GameScreen(FileName);
  2407.  
  2408.    A faster method of displaying an ANSI graphic screen (such as a full
  2409.    screen game board, etc.).  ShowFile works for this purpose but is a bit
  2410.    slower since it checks for Sysop keys, hot keys, and so on. GameScreen
  2411.    does not check ANYTHING. There is no page pausing and the screen is cleared
  2412.    before the file is displayed.  Gamescreen also sets the DOS READ ONLY flag
  2413.    on the file prior to displaying it, and removeing this flag after. This
  2414.    allows two nodes to display the file at the same time.
  2415.  
  2416. ==========================================================================
  2417.  
  2418. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 39]
  2419.  
  2420. Functions and Procedures (Continued)
  2421. ------------------------------------
  2422.  
  2423. Function GetNode                                (internal/external)
  2424.  
  2425. GetNode : INTEGER ;
  2426.  
  2427.      When writing a multi-node door program, this function will return
  2428. the current node number based on the information found in USERON.BBS file.
  2429.  
  2430. =============================================================================
  2431.  
  2432. Procedure GetMsg                                (internal/external)
  2433.  
  2434. GetMsg ;
  2435.  
  2436.      If There is an online message waiting for the current node, then it
  2437. will be displayed to that node.  
  2438.  
  2439. =============================================================================
  2440.  
  2441. Function GetBirthDate                           (external)
  2442.  
  2443. GetBirthDate : STRING[8] ;
  2444.  
  2445.      This function is used for getting a valid formatted Birthdate input.
  2446. The MM-DD-YY format is forced within this function. 
  2447.  
  2448. Example: (var MyBirthDay : String[8];)
  2449.  
  2450.      sDisplay(0,2,0,'Enter you date of birth : ');
  2451.      MyBirthDay := GetBirthDate;
  2452.  
  2453. ============================================================================
  2454.  
  2455. Function GetChar                                (internal/external)
  2456.  
  2457. GetChar : CHAR ;
  2458.  
  2459.      This function returns a single character received from either the Fossil
  2460. or the local console.  If 'Local' is FALSE, input is still accepted from the
  2461. local console if any exists.
  2462.  
  2463. UserChar := GetChar ;
  2464.  
  2465.      or for an upper case character...
  2466.  
  2467. UserChar := UPCASE(GetChar) ;
  2468.  
  2469. =============================================================================
  2470.  
  2471.  
  2472.  
  2473.  
  2474.  
  2475.  
  2476.  
  2477.  
  2478.  
  2479.  
  2480. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 40]
  2481.  
  2482. Functions and Procedures (Continued)
  2483. ------------------------------------
  2484.  
  2485. Procedure GetDorInfo                            (external)
  2486.  
  2487. GetDorInfo(Node : STRING[2]; ExitPath :STRING[255]) ;
  2488.  
  2489.      Reads the DORINFO<node>.DEF file in the 'ExitPath' directory.  Reads
  2490. the EXITINFO.BBS file in the 'ExitPath' directory.  If DORINFO<node>.DEF 
  2491. is not found, a halt code of 5 will be returned.  If EXITINFO.BBS is not 
  2492. found, a halt code of 4 is returned.  The global variable 'ExitInfoPath' 
  2493. will be set to the value of 'ExitPath' when this procedure is called.  
  2494. This procedure reads in the contents of DORINFO<node>.DEF and EXITINFO.BBS 
  2495. and initializes the unit variables:
  2496.  
  2497.             SystemName
  2498.             SysopName                 BaudString 
  2499.             SysopFirst                ANSI
  2500.             SysopLast                 TimeRemaining
  2501.             UserName                  Local
  2502.             UserFirst                 AFlag
  2503.             UserLast                  BFlag
  2504.             UserCityState             CFlag
  2505.             UserSecurity              DFlag
  2506.             PortNum                   ScrLen
  2507.  
  2508.     Node := '1' ;
  2509.     ExitPath := 'c:\ra\' ;
  2510.     GetDorInfo (node, exitpath) ;
  2511.  
  2512.     DORINFO1.DEF is read from the c:\ra\ subdirectory.
  2513.     EXITINFO.BBS is read from the c:\ra\ subdirectory.
  2514.     ExitInfoPath is set to 'c:\ra\'.
  2515.  
  2516.  
  2517. NOTES:  If 'ExitPath' is specified as '' then the current directory will
  2518.         be used and 'ExitInfoPath' will be set to ''.
  2519.  
  2520.         'Node' defaults to '1' upon unit initialization.
  2521.  
  2522.         This procedure must be called near the beginning of program execution
  2523.         in order to initialize the unit variables.
  2524.  
  2525.         Once unit variables are initialized, you may use them for display 
  2526.         or other purposes within your program.  For example:
  2527.  
  2528.         sDisplay(0,15,0,'The Sysop''s name is: ') ;
  2529.         Display(0,14,0,SysopName) ;
  2530.  
  2531.         JPDoor is designed to support RemoteAccess 0.03 data structures.
  2532.         However, if the program you create is run on a QuickBBS 2.64 system,
  2533.         the EXITINFO.BBS file will be converted automatically to RemoteAccess
  2534.         0.03 format upon program startup.  It will also be automatically
  2535.         converted back to QuickBBS 2.64 format when your program ends.  No
  2536.         intervention or conversion is required by your program!
  2537.  
  2538. =============================================================================
  2539.  
  2540.  
  2541.  
  2542. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 41]
  2543.  
  2544. Functions and Procedures (Continued)
  2545. ------------------------------------
  2546.  
  2547. Function GetInput                               (external)
  2548.  
  2549. GetInput(EchoChar : STRING[1] ; Cap,Len : INTEGER) : STRING[80] ;
  2550.  
  2551.      This function returns a STRING of length 'Len' characters received 
  2552. from the Fossil or the local console.  The STRING is shifted to upper case
  2553. if 'Cap' is set to 1.  The STRING is not shifted if 'Cap' is set to 0.  If
  2554. 'EchoChar' is set to '' then the input received is what is echoed.  If
  2555. 'EchoChar' is set to anything other than '' then input received is echoed
  2556. to the Fossil and local console as the character specified.  If 'Local' is
  2557. true, input is still accepted from the local console if any exists.
  2558.  
  2559. InStr := GetInput('',0,20) ;   {get 20 chars, echo as entered, no upshift }
  2560. InStr := GetInput('~',0,20) ;  {same as above but echo the '~' character  }
  2561. InStr := GetInput('~',1,20) ;  {same as above but shifts to upper case    }
  2562.  
  2563. =============================================================================
  2564.  
  2565. Function GetLine                                (external)
  2566.  
  2567. GetLine(Length, TabLength, Color : BYTE) : STRING[255] ;
  2568.  
  2569.      Returns a string of text with word wrap occurring at 'Length' 
  2570. characters.  TAB's are expanded to 'TabLength' spaces and output is
  2571. echoed using the foreground color 'Color'.  The unit variable 'Scrap_Entry'
  2572. must be initialized prior to the use of this function.  'Scrap_Entry' 
  2573. contains the wrapped string from the previous GetLine and will be inserted
  2574. before the string received in the next call to GetLine.
  2575.    If 'Length' is less than 1 or greater than 255, it will be set to 77.
  2576.    If 'TabLength' is less than 0 or greater than 32, it will be set to 8.
  2577.    If 'Color' is less than 0 or greater than 15, it will be set to 7.
  2578.  
  2579. Scrap_Entry := '' ;
  2580. FOR i := 1 TO 5 DO Instr[i] := GetLine(77,8,15) ;
  2581. FOR i := 1 TO 5 DO WRITELN(Instr[i]) ;
  2582.  
  2583. =============================================================================
  2584.  
  2585.  
  2586.  
  2587.  
  2588.  
  2589.  
  2590.  
  2591.  
  2592.  
  2593.  
  2594.  
  2595.  
  2596.  
  2597.  
  2598.  
  2599.  
  2600.  
  2601.  
  2602.  
  2603.  
  2604. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 42]
  2605.  
  2606. Functions and Procedures (Continued)
  2607. ------------------------------------
  2608.  
  2609. Function GetPhone                               (external)
  2610.  
  2611. GetPhone(Style : BYTE) : STRING[18] ;
  2612.  
  2613.      Prompts for input of a USA or free-style format phone number 
  2614. including area code.  This function automatically formats the user
  2615. input field depending on the 'Style' used.  Valid 'Styles' are:
  2616.  
  2617.    0  : USA Format  (Area Code) Prefix-Suffix.  The formatted
  2618.         result returned is: ###-###-####
  2619.    1  : Free-Style - Stores input number as entered by the user.
  2620.         Allows input of up to 18 characters including digits and
  2621.         dashes ('-').
  2622.  
  2623. BEGIN
  2624.    sDisplay(0,15,0,'Enter your phone number: ') ;
  2625.    SetColor(1,15,0) ;
  2626.    PhoneStr := GetPhone(0) ;
  2627.    Crlf ;
  2628.    sDisplay(0,12,0,'The phone number entered was: ') ;
  2629.    Display(0,11,0,PhoneStr) ;
  2630. END ;
  2631.  
  2632.      This procedure uses the currently selected color attributes.  Therefore,
  2633. the color attributes last used in a call to Display, sDisplay or SetColor 
  2634. will be used.
  2635.  
  2636. =============================================================================
  2637.  
  2638. Function GetSysDir                              (external/internal)
  2639.  
  2640. GetSysDir : String;
  2641.  
  2642.  If your door needs to find a directory common to all nodes, this will return
  2643.  one of the following:
  2644.  
  2645.    The System Directory pointed to by the RA environment variable
  2646.    The System Directory pointed to by the QUICK environment variable
  2647.  
  2648.    If used on a system other than QBBS or RA, then you can have the user
  2649.    set an environment variable JPDOOR and it will be used.
  2650.  
  2651.  
  2652. =============================================================================
  2653.  
  2654. Function GetWords                               (external/internal)
  2655.  
  2656. GetWords ( NumWords : INTEGER; Temp : STRING ) : STRING;
  2657.  
  2658.   This is used to get 'NumWords' words from the string passed in 'Temp'
  2659. starting at the beginning of the line.
  2660.  
  2661. Example:  GetWords(4,'This is a test of the Getwords Function');
  2662. would return 'This is a test'
  2663.  
  2664. =============================================================================
  2665.  
  2666. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 43]
  2667.  
  2668. Functions and Procedures (Continued)
  2669. ------------------------------------
  2670.  
  2671. Procedure Hangup                                (external)
  2672.  
  2673. HangUp ;
  2674.  
  2675.      Turns DTR OFF for 700 milliseconds which causes carrier to drop on
  2676. modems which do not have carrier detect forced ON.
  2677.  
  2678. Display(0,15,0,'Hanging up on user') ;
  2679. Hangup ;
  2680.  
  2681. =============================================================================
  2682.  
  2683. Procedure IncTime                               (external)
  2684.  
  2685. IncTime(TimeInc:INTEGER) ;
  2686.  
  2687.      Increments a user's time remaining in both the EXITINFO.BBS and
  2688. DORINFO1.DEF files in the 'ExitInfoPath' directory.  These may be read
  2689. in by RemoteAccess using the RA -R command line and parameter.
  2690.  
  2691. IncTime(20) ;
  2692.  
  2693.      Adds 20 minutes to the TmLimit field in the EXITINFO.BBS file.  Subtracts
  2694. 20 minutes from the UserInfo.Elapsed field in the EXITINFO.BBS file.
  2695.  
  2696.      NOTE: This procedure should only be called when the program is ended
  2697.      and before control returns to the BBS.  So, instead of calling IncTime
  2698.      repeatedly each time a user is awarded some time, keep a running
  2699.      tally of time to be incremented and save it for program exit time.
  2700.  
  2701.      See also: DecTime
  2702.  
  2703. =============================================================================
  2704.  
  2705. Function Inready                                (internal)
  2706.  
  2707. Inready : BOOLEAN ;
  2708.  
  2709.      Returns TRUE or FALSE depending on status of port 'PortNum'.  If a  
  2710. character is ready to be read from the port, inready returns TRUE.  This 
  2711. function is called by other functions within the unit.
  2712.  
  2713. REPEAT
  2714. UNTIL Inready ;
  2715.  
  2716. =============================================================================
  2717.  
  2718. Procedure InitFossil                            (internal)
  2719.  
  2720. InitFossil ( Port : BYTE ) ;
  2721.  
  2722.         You should have no reason to call this procedure, as it is called
  2723. internally by the SetFossil Function.
  2724.  
  2725. =============================================================================
  2726.  
  2727.  
  2728. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 44]
  2729.  
  2730. Functions and Procedures (Continued)
  2731. ------------------------------------
  2732.  
  2733. Function ITOA                                   (external)
  2734.  
  2735. ITOA(I : LONGINT ) : STRING ;
  2736.  
  2737.      This function will convert Integers and LongIntegers to a String Value.
  2738.  
  2739. Example : 
  2740. sDisplay(0,15,0,ITOA(er));
  2741. would return: '45'
  2742.  
  2743. =============================================================================
  2744.  
  2745. Procedure JP_Log;                               (internal/external)
  2746.  
  2747. JP_Log ( TextToLog : String );
  2748.  
  2749.         If JP_Debug is True
  2750.  
  2751. =============================================================================
  2752.  
  2753. Function JPUseAdd;                              (external)
  2754.  
  2755.   JPUseAdd : Boolean;                           {See Multi.Doc}
  2756.  
  2757.   This function is used when writing a multi-player door.
  2758.   This function is used to add a player to the multi-node data file.
  2759.   Returns TRUE if successful, FALSE if not.
  2760. =============================================================================
  2761.  
  2762. Procedure JPUseUpdate;                          (external)
  2763.  
  2764.   JPUseUpdate;                                  {See Multi.Doc}
  2765.  
  2766.   This procedure is used when writing a multi-player door.
  2767.   It is used to update the JPDOOR.USE file to reflect any new data
  2768.   from this node.
  2769.  
  2770. =============================================================================
  2771.  
  2772. Procedure JPUseExit;                            (external)
  2773.  
  2774.   JPUseExit;                                    {See Multi.Doc}
  2775.  
  2776.   This procedure is used when writing a multi-player door.
  2777.   It is used to remove the user from the JPDOOR.USE file when your
  2778.   door exits.
  2779.  
  2780. =============================================================================
  2781.  
  2782. Function JPUseGet;                              (external)
  2783.  
  2784.   JPUseGet : Boolean;                           {See Multi.Doc}
  2785.  
  2786.   This procedure is used when writing a multi-player door.
  2787.   It is used to get data from another node.
  2788. =============================================================================
  2789.  
  2790. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 45]
  2791.  
  2792. Functions and Procedures (Continued)
  2793. ------------------------------------
  2794.  
  2795. Procedure KillFossil                            (internal)
  2796.  
  2797. KillFossil ;
  2798.  
  2799.      De-initializes the FOSSIL driver.  Upon program termination, this
  2800. procedure will run automatically.
  2801.  
  2802. =============================================================================
  2803.  
  2804. Function LastPos                                (internal/external)
  2805.  
  2806. LastPos( SubStr, InStr : STRING ) : INTEGER ;
  2807.  
  2808.      The function LastPos finds the LAST occurance of SubStr in InStr.
  2809. One user of this function is to seperate a pathname from a full path\filename.
  2810.  
  2811. Example: 
  2812. PathFile := 'D:\BBS\DOORS\YOURDOOR\YOURFILE.EXT';
  2813. Path := Copy(PathFile,1,LastPos('\',Pathfile));
  2814. FileName := Copy(PathFle,LastPos('\',PathFile)+1,256);
  2815. at this point, Path Will be D:\BBS\DOORS\YOURDOOR\
  2816.         FileName will be YOURFILE.EXT
  2817.  
  2818.  
  2819. =============================================================================
  2820.  
  2821. Function LeftS                                  (external)
  2822.  
  2823. LeftS ( StrToAdjust : STRING; Tot : INEGER ) STRING;
  2824.  
  2825.      This function will return 'Tot' number of characters from the
  2826. beginning of 'StrToAdjust'.
  2827.  
  2828. Example: LeftS('12345',2);   would return '12'
  2829.  
  2830. =============================================================================
  2831.  
  2832. Function LJust                                  (external)
  2833.  
  2834. LJust ( StrToAdjust : STRING; Tot : INTEGER ) : STRING;
  2835.  
  2836.      This function will left-justify 'StrToAdjust' in a field of 'Tot'
  2837. character.
  2838.  
  2839. Example:  LJust('1',3);      would return: '1  '
  2840.  
  2841. ===========================================================================
  2842.  
  2843. Function LTrim                                 (external)
  2844.  
  2845. LTrim( A : STRING ) : STRING ;
  2846.  
  2847.      A simple function to remove all leading spaces from a string variable.
  2848.  
  2849. ============================================================================
  2850.  
  2851.  
  2852. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 46]
  2853.  
  2854. Functions and Procedures (Continued)
  2855. ------------------------------------
  2856.  
  2857. Function Lock                                   (external/internal)
  2858.  
  2859. Lock(Var FileToLock; LockStartByte,LockEndByte:Longint):Word;
  2860.  
  2861.    This function is used to lock a portion of a typed file. If SHARE is
  2862.    loaded, then this function will return one of the following values:
  2863.      0   - Lock is successful
  2864.      6   - File not open
  2865.      33  - Some of the specified range is already locked
  2866.  
  2867.    If share is not loaded, a 0 is returned as it assumes that locking is not
  2868.    needed.
  2869.  
  2870.    NOTE: If you lock a part of a data file, you MUST make sure you UNLOCK it
  2871.    as well! If you do not, it WILL remain locked until you reboot the computer.
  2872.  
  2873.    To lock the first record in a file:
  2874.  
  2875.    Type
  2876.      DataRecord = Record
  2877.          Name : String[35];
  2878.          Age  : Word;
  2879.       End;
  2880.  
  2881.    Var
  2882.      DataFile : File Of DateRecord;
  2883.      Data     : DataRecord;
  2884.      Result   : Word;
  2885.  
  2886.    Begin
  2887.      Assign(DataFile,'Names.dat');
  2888.      Reset(DataFile);
  2889.      Result := Lock(DataFile,1,SizeOf(Data));
  2890.      If Result = 0 then
  2891.      Begin
  2892.        Writeln('Record 1 is locked);
  2893.      End Else
  2894.        Writeln('Lock Failed - Error : ',Result);
  2895.      End;
  2896.  
  2897. =============================================================================
  2898.  
  2899. Function LowCase                                (internal/external)
  2900.  
  2901. LowCase(Ch : CHAR) : CHAR ;
  2902.  
  2903.      Used to convert an upper case character to it's lower case value.  If
  2904. 'Ch' is not an upper case character between A and Z, then the function will 
  2905. simply return the character originally passed, unchanged.  This function
  2906. is called by the FormatStr function.
  2907.  
  2908. TChar := LowCase(TChar) ;
  2909.  
  2910. =============================================================================
  2911.  
  2912.  
  2913.  
  2914. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 47]
  2915.  
  2916. Functions and Procedures (Continued)
  2917. ------------------------------------
  2918.  
  2919. Function MaxNodes                               (external/internal)
  2920.  
  2921. MaxNodes : Integer;
  2922.  
  2923. This will scan either a QBBS 2.75 or RA 1.xx USERON.BBS and count the number
  2924. of records. This will be the maximum number of nodes supported by your door.
  2925. This routine is called internally.
  2926.  
  2927. =============================================================================
  2928.  
  2929. Function MKString                                (external)
  2930.  
  2931. MKString(Number,Character);
  2932.  
  2933.      This handy function that can save time in drawing lines.
  2934.  
  2935. Before: (you had to do this)
  2936. sDisplay(0,15,0,'-------------------------');
  2937.  
  2938. Example: (now it's this easy)
  2939. sDisplay(0,15,0,MKString(25,'-'));
  2940.  
  2941. =============================================================================
  2942.  
  2943. Procedure More                                  (external)
  2944.  
  2945. More(Prompt : STRING[80] ; n : BYTE) ;
  2946.  
  2947.      Causes 'Prompt' to be displayed using color attribute 'n' to the Fossil
  2948. and local console and waits for single character input.
  2949.  
  2950. FOR i := 1 TO 5 DO Display(15,Instr[i]) ;
  2951. More('Press any key to continue',15) ;
  2952.  
  2953. =============================================================================
  2954.  
  2955. Procedure NilProc                              (external/internal)
  2956.  
  2957. NilProc;
  2958.  
  2959.         This is simply a do-nothing procedure.
  2960.  
  2961.  If SomeBoolean then NilProc Else OtherProcedure;
  2962.  
  2963. =============================================================================
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970.  
  2971.  
  2972.  
  2973.  
  2974.  
  2975.  
  2976. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 48]
  2977.  
  2978. Functions and Procedures (Continued)
  2979. ------------------------------------
  2980.  
  2981. Function PostMsg                                (external)
  2982.  
  2983. PostMsg(Lines : Integer; MsgPath : String) : Integer;
  2984.  
  2985.     This function will check the Global Boolean QBBS to see if it is to
  2986.     write to the QBBS message base. If QBBS is False (default) then it will
  2987.     attempt to write to an RA1.xx message base. Full file locking is supported.
  2988.  
  2989.     Uses MsgBuff : Array[0..100] of String[80]; which is a global array.
  2990.     Fill MsgBuff with your message, starting with MsgBuff[1].
  2991.     MsgBuff[0] is used internally to add a product ID kludge to the message.
  2992.     You MUST make sure to add a character 13 (Carriage Return) to the end of
  2993.     each line, including blank lines...
  2994.  
  2995.     Lines is the number of lines used (ie, if last line used was MsgBuff[10]
  2996.     then set Lines := 10
  2997.     MsgPath is the path to the message base - MUST end with \
  2998.  
  2999.     If successful, PostMsg returns a 0, if not, -100
  3000.  
  3001.     PostMsg will determine the correct Message Number, but you are required
  3002.     to fill out the rest of the following structure:
  3003.  
  3004.  
  3005.  
  3006.   MSGHDRrecord   = record
  3007.                      MsgNum         : Integer;
  3008.                      PrevReply,
  3009.                      NextReply,
  3010.                      TimesRead      : Word;
  3011.                      StartBlock     : Word;
  3012.                      NumBlocks,
  3013.                      DestNet,
  3014.                      DestNode,
  3015.                      OrigNet,
  3016.                      OrigNode       : Word;
  3017.                      DestZone,
  3018.                      OrigZone       : Byte;
  3019.                      Cost           : Word;
  3020.                      MsgAttr,
  3021.                      NetAttr,
  3022.                      Board          : Byte;
  3023.                      PostTime       : String[5];
  3024.                      PostDate       : String[8];
  3025.                      WhoTo,
  3026.                      WhoFrom        : String[35];
  3027.                      Subject        : String[72];
  3028.                    end;
  3029.  
  3030.       The pre-defined variable that contains this structure is Hdr
  3031.  
  3032.       Hdr : MsgHdrRecord;
  3033.  
  3034.  
  3035.  
  3036.  
  3037.  
  3038. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 49]
  3039.  
  3040. Functions and Procedures (Continued)
  3041. ------------------------------------
  3042.  
  3043. Function PostMsg (Continued)
  3044.  
  3045.       Here is an example of posting a message, taken from my Battle Ships
  3046.       Door:
  3047.  
  3048.  
  3049.  
  3050.  
  3051. Procedure PostResults;
  3052. Var
  3053.   X : Integer;
  3054. Begin
  3055.   ClearScreen;
  3056.   Display(0,15,0,'Congratulations! You are a winner!');
  3057.   With Hdr do
  3058.   begin
  3059.      WhoTo     := FormatStr(Opponent);;
  3060.      Subject   := 'BattleShips Report';
  3061.      Board     := Boardno;
  3062.      WhoFrom   := UserName;
  3063.      PostDate  := DateStr;
  3064.      PostTime  := TimeStr;
  3065.      PrevReply := 0;
  3066.      NextReply := 0;
  3067.      DestNet   := 0;
  3068.      DestNode  := 0;
  3069.      OrigNet   := 0;
  3070.      OrigNode  := 0;
  3071.      DestZone  := 0;
  3072.      OrigZone  := 0;
  3073.      Cost      := 0;
  3074.      MsgAttr   := Msg_Local;
  3075.      NetAttr   := 0;
  3076.   End;
  3077.   MsgBuff[1] := 'Message posted by Motor City Battle Ships!'+#13;
  3078.   MsgBuff[2] := '  ' + #13;
  3079.   MsgBuff[3] := 'In a game of BattleShips on '+DateStr+' at '+TimeStr+ #13;
  3080.   MsgBuff[4] := ' ' + #13;
  3081.   MsgBuff[5] := FormatStr(Username)+' Won in '+ ItoA(NumShots) +' Shots!'+ #13;
  3082.   MsgBuff[6] := FormatStr(Opponent)+' Lost'+ #13;
  3083.   MsgBuff[7] := '  '+ #13;
  3084.   If BoardNo <> 0 then
  3085.   Begin
  3086.     CrLf;
  3087.     Display(0,14,0,'Hang on, posting message');
  3088.     X := PostMsg(7,MsgPth);
  3089.     Delay(2000);
  3090.   End;
  3091. End;
  3092.  
  3093.  
  3094.  
  3095. =============================================================================
  3096.  
  3097.  
  3098.  
  3099.  
  3100. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 50]
  3101.  
  3102. Functions and Procedures (Continued)
  3103. ------------------------------------
  3104.  
  3105. Function RightS                                 (external)
  3106.  
  3107. RightS ( StrToAdjust : STRING; Tot : INEGER ) STRING;
  3108.  
  3109.      This function will return 'Tot' number of characters from the
  3110. end of 'StrToAdjust'.
  3111.  
  3112. Example: RightS('12345',2);
  3113. would return '45'
  3114.  
  3115. =============================================================================
  3116.  
  3117. Function RJust                                  (external)
  3118.  
  3119. RJust(StrToAdjust : STRING ; Tot : INTEGER ) : STRING ;
  3120.  
  3121.      This function will Right-justify 'StrToAdjust' in a field of 'Tot'
  3122. characters.
  3123.  
  3124. Example:  RJust('1',3);
  3125. Would Return: '  1'
  3126.  
  3127. ============================================================================
  3128.  
  3129. Function RTrim                                  (external)
  3130.  
  3131. RTrim(A : STRING) : STRING ;
  3132.  
  3133.      This function will trim trailing spaces from the varaible string.
  3134.  
  3135. Example:  RTrim('Apple    ');
  3136. Would Return: 'Apple';
  3137.  
  3138. ============================================================================
  3139.  
  3140. Procedure sDisplay                              (external)
  3141.  
  3142. sDisplay(BackGround,ForeGround,Blink : BYTE ; Line:STRING[80]) ;
  3143.  
  3144.      This is identical to the Display procedure except that no carriage
  3145. return/line feed sequence is output.
  3146.  
  3147. sDisplay(0,15,0,'Menu options') ;
  3148. sDisplay(0,12,0,' [A/B/C/Q] ') ;
  3149. sDisplay(0,2,0,'Your choice: ') ;
  3150.  
  3151. =============================================================================
  3152.  
  3153.  
  3154.  
  3155.  
  3156.  
  3157.  
  3158.  
  3159.  
  3160.  
  3161.  
  3162. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 51]
  3163.  
  3164. Functions and Procedures (Continued)
  3165. ------------------------------------
  3166.  
  3167. Procedure sDisplayLoc                           (external)
  3168.  
  3169. sDisplayLoc(BackGround,ForeGround,Blink:BYTE ; Line:STRING[80]) ;
  3170.  
  3171.      This procedure displays the line ('Line') to local console only.  This
  3172. procedure should be used instead of WRITE when displaying text to the local
  3173. console only.  If StatusLineON is set to TRUE, this procedure will take care
  3174. of scrolling the screen window properly.
  3175.  
  3176. Valid color attributes are as shown in the Display procedure.
  3177.  
  3178. BEGIN
  3179.    IF NOT EXIST('MyFile.Txt') THEN BEGIN
  3180.       sDisplayLoc(0,15,1,#7 + 'MYFILE.TXT') ;
  3181.       DisplayLoc(0,14,0,' NOT FOUND') ;
  3182.       HALT(15) ;
  3183.    END ;
  3184. END ;
  3185.  
  3186.  
  3187. =============================================================================
  3188.  
  3189. Procedure SendMsg                               (external)
  3190.  
  3191. SendMsg;
  3192.  
  3193.      This procedure is another of the Multi-node support functions and 
  3194. procedures.  This will allow your user to send an online message while they
  3195. are in the door program that you have constructed.  Users can now send up to
  3196. 10 lines of text in an online message.  Online message may be broadcast to
  3197. ALL users currently online.  DoNotDistrub flag is honored.
  3198.  
  3199. ==============================================================================
  3200.  
  3201. Procedure SetColor                              (external)
  3202.  
  3203. SetColor(BackGround,ForeGround,Blink) ;
  3204.  
  3205.      This procedure will initialize the ANSI sequences.  This should only
  3206. be done after the unit variable ANSI has been set to either 0 (no graphics)
  3207. or 1 (ANSI on).  The valid color values for initialization are given in the
  3208. color table shown under the Display procedure.
  3209.  
  3210.      This procedure also initializes the variables C_Back, C_Fore and C_Blink.
  3211.  
  3212. GetDorInfo(Node,'') ;
  3213. SetColor(0,7,0) ;
  3214.  
  3215. =============================================================================
  3216.  
  3217.  
  3218.  
  3219.  
  3220.  
  3221.  
  3222.  
  3223.  
  3224. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 52]
  3225.  
  3226. Functions and Procedures (Continued)
  3227. ------------------------------------
  3228.  
  3229. Procedure SetFlag                               (external)
  3230.  
  3231. SetFlag(Flag : FlagSet ; OnOff : On_Off) ;
  3232.  
  3233.      Sets a user's flag in the EXITINFO.BBS file in the 'ExitInfoPath' 
  3234. directory.  On a type 15 exit, the EXITINFO.BBS file would be read in 
  3235. and the values stored in USERS.BBS upon re-entry to the BBS.  So, a 
  3236. permanent change would take effect when the user re-enters the BBS.
  3237.  
  3238. SetFlag(A1,On) ;
  3239.  
  3240.      Sets the user's A1 flag to ON in the EXITINFO.BBS file contained 
  3241. in the 'ExitInfoPath' directory.
  3242.  
  3243.  
  3244. =============================================================================
  3245.  
  3246. Function SetFlagUser                            (external)
  3247.  
  3248. SetFlagUser(Path:Str80 ; UserToSet:Str35 ; Flag:FlagSet ; OnOff:On_Off):BYTE;
  3249.  
  3250.      Sets a flag for 'UserToSet' in the USERS.BBS file located in the 
  3251. 'Path' directory.  If 'UserToSet' is set to 'ALL' then all users in the 
  3252. USERS.BBS file will have their flags set accordingly.  This function works 
  3253. directly on the USERS.BBS file and does not effect any existing EXITINFO.BBS 
  3254. file.  This is good for other utility programs not necessarily run as door
  3255. programs.
  3256.  
  3257. SetFlagUser returns one of the following byte values:
  3258.  
  3259.         0 : No errors
  3260.         1 : 'UserToSet' was not found in the USERS.BBS file
  3261.         2 : The USERS.BBS file was not found in the 'path' directory
  3262.  
  3263.  
  3264.      HOW TO USE SetFlagUser:
  3265.  
  3266. VAR
  3267.   ErrVal : BYTE ;
  3268. BEGIN
  3269.   ErrVal := SetFlagUser('',UserName,A5,ON) ;
  3270.   IF ErrVal <> 0 THEN BEGIN
  3271.     CASE ErrVal OF
  3272.       1 : WRITELN(UserName,' was not found in USERS.BBS') ;
  3273.       2 : WRITELN('USERS.BBS file was not found') ;
  3274.     END ;
  3275.   END ;
  3276. END ;
  3277.  
  3278.      Sets flag A5 to ON for the user name contained in the unit variable
  3279. 'UserName' in the USERS.BBS file located in the current directory.  If ErrVal
  3280. is not equal to 0, the appropriate error message is displayed to the local
  3281. console.
  3282.  
  3283.  
  3284.  
  3285.  
  3286. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 53]
  3287.  
  3288. Functions and Procedures (Continued)
  3289. ------------------------------------
  3290.  
  3291. Function SetFlagUser (Continued)
  3292.  
  3293. IF SetFlagUser('','John Doe',A5,ON) <> 0 THEN WRITELN('error occurred') ;
  3294.  
  3295.      Sets flag A5 to ON for user name 'John Doe' in the USERS.BBS file 
  3296. located in the current directory.  If the value returned by SetFlagUser is 
  3297. not equal to 0 then the error message 'error occurred' is displayed to the
  3298. local console.
  3299.  
  3300. IF SetFlagUser('\QuickBBS\','ALL',A5,ON) <> 0
  3301.   THEN WRITELN('USERS.BBS file not found') ;
  3302.  
  3303.      Sets flag A5 to ON for all users in the USERS.BBS file located in 
  3304. the \QuickBBS\ directory.  If the value returned by SetFlagUser is not 
  3305. equal to 0 then we can assume that the USERS.BBS file was not found since 
  3306. this example is not looking for a specific user.  The error message 
  3307. 'USERS.BBS file not found' is displayed.
  3308.  
  3309. NOTE:  The values passed to SetFlagUser are not case-sensitive.  Therefore:
  3310.  
  3311.        IF SetFlagUser('','all',a5,on) <> 0 THEN WRITELN('error occurred') ;
  3312.  
  3313.            is the same as:
  3314.  
  3315.        IF SetFlagUser('','ALL',A5,ON) <> 0 THEN WRITELN('error occurred') ;
  3316.  
  3317. =============================================================================
  3318.  
  3319. Function SetFossil                              (external)
  3320.  
  3321. SetFossil : BOOLEAN ;
  3322.  
  3323.      Returns TRUE if a FOSSIL driver is installed and FALSE if one is not.
  3324.  
  3325. IF SetFossil THEN WRITELN('Fossil installed') ELSE BEGIN
  3326.    WRITELN(#7,'Fossil not found') ;
  3327.    HALT(0) ;
  3328. END ;
  3329.  
  3330. =============================================================================
  3331.  
  3332.  
  3333.  
  3334.  
  3335.  
  3336.  
  3337.  
  3338.  
  3339.  
  3340.  
  3341.  
  3342.  
  3343.  
  3344.  
  3345.  
  3346.  
  3347.  
  3348. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 54]
  3349.  
  3350. Functions and Procedures (Continued)
  3351. ------------------------------------
  3352.  
  3353. Function SetGraphics                            (external)
  3354.  
  3355. SetGraphics : CHAR ;
  3356.  
  3357.      SetGraphic returns a character value:
  3358.  
  3359. A = User has ASCII only Capability...... ANSI is set to 0.
  3360. C = User has Color and ANSI ability..... ANSI is set to 1.
  3361. M = User has ANSI but mono display...... ANSI is set to 5.
  3362.  
  3363. ANSI value of 5 is the used by DrawCard, and works well!  So, we are 
  3364. reserving ANSI = 5.
  3365.  
  3366. Example usage:
  3367. Var
  3368.  
  3369. Graphics     : CHAR ;
  3370. .......
  3371. ......
  3372.  
  3373. GetDorInfo('1','') ;
  3374. SetColor(0,7,0) ;
  3375. Graphics := SetGraphics ;
  3376. IF Graphics = 'A' THEN
  3377. BEGIN
  3378.    sDisplay(0,7,0,'Sorry but this game Requires Graphics') ;
  3379.    HALT(99) ;
  3380. END ;
  3381.  
  3382. =============================================================================
  3383.  
  3384. Procedure SetHotKeys_OFF                        (external)
  3385.  
  3386. SetHotKeys_OFF ;
  3387.  
  3388.      Turns off Hot-Key trapping.  Also, the following variables are set:
  3389.  
  3390. HotKeyPressed := FALSE ;
  3391. HotKeyOn      := FALSE ;
  3392. Range         := [#0] ;
  3393.  
  3394. =============================================================================
  3395.  
  3396.  
  3397.  
  3398.  
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409.  
  3410. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 55]
  3411.  
  3412. Functions and Procedures (Continued)
  3413. ------------------------------------
  3414.  
  3415. Procedure SetHotKeys_ON                         (external)
  3416.  
  3417. SetHotKeys_ON(Kill:KillType ; Range:CharSet) ;
  3418.  
  3419.      The TYPES used are declared as follows:
  3420.  
  3421. TYPE
  3422.    KillType = Kill, NoKill ;
  3423.    CharSet  = Set Of CHAR ;
  3424.  
  3425.      'Range' is a set of characters which are valid Hot-Keys.  These should
  3426. be specified in upper case format.  If any of the specified characters are
  3427. pressed, all display output is stopped (nothing is echoed to the FOSSIL
  3428. driver), and the global unit variable 'HotKeyPressed' is set to TRUE.  Once
  3429. this call is made, an internal global variable 'HotKeyOn' is also set to
  3430. TRUE.  You may reference this variable if necessary.
  3431.  
  3432.  
  3433.      If 'Kill' is specified, the Hot-Key pressed is killed from its 
  3434. accumulator.  That is to say that it is not "remembered". If 'NoKill' 
  3435. is specified, the Hot-Key is "remembered" and will be automatically 
  3436. returned to the next call to GetChar.  This is intended for uses such 
  3437. as breaking out of a text file display.   You can define a Hot-Key to 
  3438. break out of the display yet not have it passed onto the next 'GetChar' 
  3439. call.  Specifying the 'Kill' parameter allows this.
  3440.  
  3441. For example:
  3442.  
  3443. VAR
  3444.    Choice     : CHAR ;
  3445. PROCEDURE ShowMenu ;
  3446. BEGIN
  3447.    Display(0,15,0,'<C>hange Setup') ;
  3448.    Display(0,15,0,'<H>elp Text') ;
  3449.    Display(0,15,0,'<G>oodbye') ;
  3450.    CRLF ;
  3451.    sDisplay(0,14,0,'Enter your choice: ') ;
  3452. END ;
  3453. BEGIN
  3454.    SetHotKeys_ON(NoKill, ['C','H','G']) ;
  3455.    ShowMenu ;
  3456.    REPEAT
  3457.       Choice := UPCASE(GetChar) ;
  3458.    UNTIL Choice in ['C','H','G'] ;
  3459.    Display(0,15,0,Choice) ;
  3460.    SetHotKeys_OFF ;
  3461.    CASE Choice OF
  3462.       'C' : DoChangeSetup ;
  3463.       'G' : DoLogOff ;
  3464.       'H' : BEGIN
  3465.                SetHotKeys_ON(Kill, ['S']) ;
  3466.                ShowFiles(15,2,11,'MYHELP.ASC','\RA\TXTFILES\') ;
  3467.                SetHotKeys_OFF ;
  3468.             END ;
  3469.    END ;
  3470.  
  3471.  
  3472. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 56]
  3473.  
  3474. Functions and Procedures (Continued)
  3475. ------------------------------------
  3476.  
  3477. Procedure SetHotKeys_ON (Continued)
  3478.  
  3479. This would allow the Hot-Keys C, H, or G to interrupt the display of the
  3480. menu called by ShowMenu and the next 'GetChar' call would "remember" the
  3481. Hot-Key that was pressed.
  3482.  
  3483. If H is selected, Hot_Keys are turned on specifying that S is a valid
  3484. Hot-Key and that if it is pressed, it will not be remembered by the next
  3485. call to 'GetChar'.
  3486.  
  3487. Valid 'Range' entries can be any number of characters:
  3488.  
  3489. SetHotKeys_On(NoKill, ['A'..'Z', '0'..'9', '!']) ;
  3490. SetHotKeys_On(Kill, ['S']) ;
  3491. SetHotKets_On(NoKill, ['A','B','C']) ;
  3492.  
  3493.  
  3494. =============================================================================
  3495.  
  3496. Procedure Set_Retries                           (external/internal)
  3497.  
  3498. Set_Retries(LockRetries,LockLoops:Integer);
  3499.  
  3500.  LockRetries is the number of times DOS will try to read the locked file
  3501.  before a failure is reported. LockLoops is the pause between each retry.
  3502.  DOS defaults are LockRetries := 3, and LockLoops := 1
  3503.  
  3504. =============================================================================
  3505.  
  3506.  
  3507. Procedure ShowFile                              (external)
  3508.  
  3509. ShowFile(fColor, pType, pColor, FileName, Path)
  3510.  
  3511.  
  3512. fColor   is the initial color to display  0 = no change.
  3513. pType    is the prompt type               0 = no prompt. 1 = pause. 2 = more.
  3514. pColor   is the prompt color              0 = no prompt.
  3515. FileName is the file name
  3516. Path     is the path to find FileName
  3517.  
  3518.  
  3519.      ShowFile replaces the ShowAnsiFile and ShowTextFile procedures.  It 
  3520. is used display ANSI files and/or ASCII text files.  ShowFile will look for
  3521. the file 'FileName' in the 'Path' directory.  If no filename extension is
  3522. specified, ShowFile will check the user's ANSI setting.  If ANSI is set
  3523. to 1, ShowFile will then check for to see if 'FileName' + '.ANS' exists.  
  3524. If no .ANS file exists, ShowFile will check to see if 'FileName' + '.ASC' 
  3525. exists.
  3526.  
  3527.      You may specify any filename extension.  If the file exists in the
  3528. 'Path' directory, ShowFile will display it.
  3529.  
  3530.  
  3531.  
  3532.  
  3533.  
  3534. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 57]
  3535.  
  3536. Functions and Procedures (Continued)
  3537. ------------------------------------
  3538.  
  3539. Procedure ShowFile (Continued)
  3540.  
  3541.      ShowFile recognizes many of the RemoteAccess/QuickBBS embedded
  3542. control codes.  If a control code is encountered for which there is 
  3543. no support, 'N/A' will be substituted.
  3544.  
  3545.      Examples :
  3546.  
  3547. ShowFile(0,0,0,'WELCOME.ANS','\RA\TXTFILES');
  3548.  
  3549.      will display \RA\TXTFILES\WELCOME.ANS with no color change or pausing.
  3550.  
  3551. ShowFile(10,1,12,'HELLO.TXT','');
  3552.  
  3553.      will display HELLO.TXT (from the current directory) in light green, 
  3554.      with a red '---PAUSED---' prompt.
  3555.  
  3556. ShowFile(1,2,2,'SECURITY','\');
  3557.  
  3558.      will display \SECURITY.ANS, if ANSI = 1 and \SECURITY.ANS exists, and 
  3559.      will over ride the color/prompting settings to 0.  If ANSI = 0 or 
  3560.      \SECURITY.ANS doesn't exist, it will display \SECURITY.ASC in blue
  3561.      with a green 'More (Y,n)?' prompt.
  3562.  
  3563. ShowFile(7,1,7,'README.','');
  3564.  
  3565.      will display the file README in white with a white '---PAUSED---' prompt
  3566.      (specifying the '.' forces no extension).
  3567.  
  3568.      Since a text file could have any name and extension (even an extension
  3569.      of .ANS) it will use the color/prompt values passed, unless no extension 
  3570.      is specified and .ANS is automatically selected.
  3571.  
  3572. ShowFile(10,2,12,'GREET.ANS');
  3573.  
  3574.      will display GREET.ANS with an initial color of green and a red 
  3575.      'More (Y,n)?' prompt.
  3576.  
  3577. ShowFile(0,0,0,'GREET.ASC');
  3578.  
  3579.      will display STORY.ASC with no initial color change and no prompting.
  3580.  
  3581. ShowFile(10,2,12,'GREET');
  3582.  
  3583.      will not use the color/prompting values, if it assumes .ANS, but will 
  3584.      use them, if it assumes .ASC.
  3585.  
  3586. =============================================================================
  3587.  
  3588.  
  3589.  
  3590.  
  3591.  
  3592.  
  3593.  
  3594.  
  3595.  
  3596. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 58]
  3597.  
  3598. Functions and Procedures (Continued)
  3599. ------------------------------------
  3600.  
  3601. Procedure ShowFilesBBS                          (external)
  3602.  
  3603. ShowFilesBBS(VAR LnCount                          : INTEGER ;
  3604.                  n, pause, Fc, Sc, Dc, Ec, Mc, Bc : BYTE ;
  3605.                  FPath, Fn                        : TextString ;
  3606.                  VAR Cont                         : BOOLEAN ;
  3607.                      oneline                      : BOOLEAN) ;
  3608.  
  3609.      This procedure allows the user to pass a path and filename to a 
  3610. files.bbs file format and the ShowFilesBBS will display with more prompting,
  3611. and display files, sizes, date/time stamp and description.  This is fully
  3612. configurable.
  3613.  
  3614. LnCount : how many lines to display before issuing a more prompt.
  3615.       n : color of more prompt
  3616.   pause : 0 = no pause, 1 = '==PAUSED==', 2 = 'More (Y/n)' more prompt styles
  3617.      Fc : color to use to display files
  3618.      Sc : color to use to display file sizes
  3619.      Dc : color to use to display date stamp
  3620.      Ec : color to use to display descriptions
  3621.      Mc : color to use to display *** MISSING ***
  3622.      Bc : background color to all of the above.
  3623.   Fpath : path to files.bbs (fully qualified)
  3624.      fn : filename of files.bbs format file.
  3625.    cont : passes the response to the more prompt back to users code segment.
  3626.  
  3627. =============================================================================
  3628.  
  3629. Procedure Show_Status                           (internal)
  3630.  
  3631. Show_Status ;
  3632.  
  3633.      This procedure will cause the status line to be refreshed when called.
  3634. Users are not required to call this procedure directly as the use of any of
  3635. JPDOOR's I/O functions will automatically refresh the status line when needed.
  3636.  
  3637.      JPDOOR MUST BE INITIALIZED BEFORE ANY CALLS ARE MADE TO THIS PROCEDURE 
  3638. or unpredicted results will occurr.  That is to say that this should only be
  3639. used after GetDorInfo has been executed.
  3640.  
  3641. =============================================================================
  3642.  
  3643. Function SizeFile                               (external)
  3644.  
  3645. SizeFile : LONGINT ;
  3646.  
  3647.      This Function Returns LongInt vaule which represent the size (number of
  3648. bytes) of a file name that is passed to it.
  3649.  
  3650. =============================================================================
  3651.  
  3652.  
  3653.  
  3654.  
  3655.  
  3656.  
  3657.  
  3658. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 59]
  3659.  
  3660. Functions and Procedures (Continued)
  3661. ------------------------------------
  3662.  
  3663. Procedure StatBar                               (external/internal)
  3664.  
  3665. StatBar ( N : BYTE );
  3666.  
  3667.         This procedure can be called to change the status bar to any
  3668. of the 9 visible status bars, or if you pass it a 10, it turns off the
  3669. status bar, and sets StatusLineOn := False;  Hitting the function keys
  3670. while the door is running calls this procedure, EG F1 makes a call to
  3671. StatBar(1) while F6 makes a call to StatBar(6);
  3672.  
  3673. =============================================================================
  3674.  
  3675. Function TimeStr                                (external/internal)
  3676.  
  3677. TimeStr : String;
  3678.  
  3679.   Returns the current time as HH:MM:SS in 24 hour format.
  3680.  
  3681.   Display(0,15,0,'The Current Time Is ' + TimeStr);
  3682.  
  3683. =============================================================================
  3684.  
  3685. Function TimeToEvent                            (external)
  3686.  
  3687. TimeToEvent : INTEGER ;
  3688.  
  3689.      Returns the number of minutes until the next system event.  This 
  3690. function will open and read the EXITINFO.BBS file in the 'ExitInfoPath' 
  3691. directory.  If not found, a halt code of 4 will be returned.
  3692.  
  3693. VAR
  3694.   Time     : INTEGER ;
  3695.   s        : STRING[4] ;
  3696. BEGIN
  3697.   Time := TimeToEvent ;
  3698.   sDisplay(0,15,0,'Time to next system event: ') ;
  3699.   STR(Time,s) ;
  3700.   sDisplay(0,5,0,s) ;
  3701.   Display(0,15,0,' minutes') ;
  3702. END ;
  3703.  
  3704. =============================================================================
  3705.  
  3706. Procedure UnLock;                               (external/internal)
  3707.  
  3708. Unlock(Var FileToUnlock; LockStartByte,LockEndByte:LongInt);
  3709.  
  3710.  When you lock a portion of a data file, you MUST make sure you unlock it
  3711.  or it will remain locked until you reboot the computer!
  3712.  
  3713. =============================================================================
  3714.  
  3715.  
  3716.  
  3717.  
  3718.  
  3719.  
  3720. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 60]
  3721.  
  3722. Functions and Procedures (Continued)
  3723. ------------------------------------
  3724.  
  3725. Function UserOnNode                             (external/internal)
  3726.  
  3727. UserOnNode(NodeToPage : INTEGER ) : STRING ;
  3728.  
  3729.      This function used with multi-node setups, will return the name of
  3730. the user on NodeToPage.  And will return '' if no one is online.
  3731.  
  3732. =============================================================================
  3733.  
  3734. Procedure Win_Scroll                            (internal)
  3735.  
  3736. Win_Scroll ;
  3737.  
  3738.      This procedure will cause the window (lines 1-23) to scroll up one 
  3739. line.  Users are not required to call this procedure directly as the use 
  3740. of any of JPDOOR's I/O functions will automatically scroll the video when 
  3741. needed, if StatusLineOn is set to TRUE.
  3742.  
  3743. =============================================================================
  3744.  
  3745. Procedure WhosOn                                (external)
  3746.  
  3747. WhosOn ;
  3748.  
  3749.      This procedure will return a list of users currently online in a 
  3750. multi-node(line) setup.  Similar to RA 1.xx and Quickbbs 2.75.
  3751.  
  3752. ===============================================================================
  3753.  
  3754. Function WTOA                                   (external)
  3755.  
  3756. WTOA(I : WORD) : STRING ;
  3757.  
  3758.      This function will convert a word value to string.
  3759.  
  3760. Example:   
  3761. sDisplay(0,15,0,WTOA(75)) ;
  3762. Would return: '75'
  3763.  
  3764. ===============================================================================
  3765.  
  3766.  
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777.  
  3778.  
  3779.  
  3780.  
  3781.  
  3782. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 61]
  3783.  
  3784.  
  3785.  
  3786.                              E n d   O f
  3787.  
  3788.                        D o c u m e n t a t i o n
  3789.                        -------------------------
  3790.  
  3791.  
  3792.         For Printed copies of this documentation please contact
  3793.  
  3794.                          Motor City Software
  3795.  
  3796.  
  3797.            ┌──────────────────────────────────────────────┐
  3798.            │             MOTOR CITY SOFTWARE              │
  3799.            │   ┌──────────────────────────────────────┐   │
  3800.            │   │       JPDoor - Version 3.2 SE        │   │
  3801.            │   │        Copyright 1990 - 1992         │   │
  3802.            │   │            ┌──────────┐              │   │
  3803.            │   │            │\         │              │   │
  3804.            │   │            │ \        │              │   │
  3805.            │   │            │  \   P   │              │   │
  3806.            │   │            │   \  A   │              │   │
  3807.            │   │            │   │  S   │              │   │
  3808.            │   │            │   │  C   │              │   │
  3809.            │   │     5.5    │   │  A   │    6.0       │   │
  3810.            │   │            │  o│  L   │              │   │
  3811.            │   │            │   │      │              │   │
  3812.            │   │            \   │──────┘              │   │
  3813.            │   │             \  │                     │   │
  3814.            │   └──────────────\ │─────────────────────┘   │
  3815.            │      The Ultimate \│ Door Writing Unit.      │
  3816.            └────────────────────┴─────────────────────────┘
  3817.  
  3818.  
  3819.  
  3820.                          JPDoor - Version 3.2 SE
  3821.              Copyright 1990,1991,1992 by Motor City Software
  3822.                            All Rights Reserved
  3823.  
  3824.  
  3825.  
  3826.  
  3827.  
  3828.  
  3829.  
  3830.  
  3831.  
  3832.  
  3833.  
  3834.  
  3835.  
  3836.  
  3837.  
  3838.  
  3839.  
  3840.  
  3841.  
  3842.  
  3843.  
  3844. [ JPDoor V3.2 SE Reference Manual ]                               [ Page 62]
  3845.